Appropriate error message if retrying connect failed.
This commit is contained in:
parent
676cbbb8a8
commit
cad703672f
|
@ -239,16 +239,18 @@
|
|||
(fdport-data:channel
|
||||
(fdport-data (socket:inport sock))))
|
||||
(if (eq? res 0)
|
||||
(handle-EINPROGRESS sock)
|
||||
(loop))))))))))))
|
||||
|
||||
;;; If connect returned EINPROGRESS, we can check it's success after
|
||||
;;; the next success with getsockopt
|
||||
|
||||
(define (handle-EINPROGRESS sock)
|
||||
(let ((val (socket-option sock level/socket socket/error)))
|
||||
;; If connect returned EINPROGRESS, we can check
|
||||
;; it's success after the next success with getsockopt
|
||||
(let ((val (socket-option sock
|
||||
level/socket
|
||||
socket/error)))
|
||||
(if (not (zero? val))
|
||||
(errno-error val "scheme_connect" %connect))))
|
||||
(errno-error val
|
||||
(errno-msg val)
|
||||
%connect
|
||||
sock
|
||||
name)))
|
||||
(loop))))))))))))
|
||||
|
||||
(import-os-error-syscall %connect (sockfd family name) "scheme_connect")
|
||||
|
||||
|
|
Loading…
Reference in New Issue