More general tcp-connect error catching.
This commit is contained in:
parent
c9ec9f6be9
commit
eb564fdb7c
|
@ -111,11 +111,10 @@
|
||||||
(define (spawn-tcp-connection local-addr remote-addr)
|
(define (spawn-tcp-connection local-addr remote-addr)
|
||||||
(match-define (tcp-address remote-hostname remote-port) remote-addr)
|
(match-define (tcp-address remote-hostname remote-port) remote-addr)
|
||||||
(define-values (cin cout)
|
(define-values (cin cout)
|
||||||
(with-handlers ([exn:fail:network? (lambda (e)
|
(with-handlers ([exn:fail? (lambda (e)
|
||||||
;; TODO: it'd be nice to
|
;; TODO: it'd be nice to somehow
|
||||||
;; somehow communicate the
|
;; communicate the actual error to
|
||||||
;; actual error to the local
|
;; the local peer.
|
||||||
;; peer.
|
|
||||||
(log-error "~a" (exn->string e))
|
(log-error "~a" (exn->string e))
|
||||||
(define o (open-output-string))
|
(define o (open-output-string))
|
||||||
(close-output-port o)
|
(close-output-port o)
|
||||||
|
|
Loading…
Reference in New Issue