Better logging of websocket connection failures.
This commit is contained in:
parent
931c54df6a
commit
0f1fabddfb
|
@ -141,10 +141,12 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(log-info "Connecting to ~a ~a" url (current-inexact-milliseconds))
|
(log-info "Connecting to ~a ~a" url (current-inexact-milliseconds))
|
||||||
(define c (with-handlers [(exn? values)] (ws-connect (string->url url))))
|
(define c (with-handlers [(exn? values)] (ws-connect (string->url url))))
|
||||||
(log-info "Connected to ~a ~a" url (current-inexact-milliseconds))
|
(when (exn? c)
|
||||||
|
(log-info "Connection to ~a failed: ~a" url (exn->string c)))
|
||||||
(send-ground-message
|
(send-ground-message
|
||||||
(websocket-connection id local-addr remote-addr c control-ch))
|
(websocket-connection id local-addr remote-addr c control-ch))
|
||||||
(when (not (exn? c))
|
(when (not (exn? c))
|
||||||
|
(log-info "Connected to ~a ~a" url (current-inexact-milliseconds))
|
||||||
(connection-thread-loop control-ch c id))))
|
(connection-thread-loop control-ch c id))))
|
||||||
(spawn (lambda (e buffered-messages-rev)
|
(spawn (lambda (e buffered-messages-rev)
|
||||||
(match e
|
(match e
|
||||||
|
|
Loading…
Reference in New Issue