Appropriate error message if retrying connect failed.
This commit is contained in:
parent
676cbbb8a8
commit
cad703672f
|
@ -239,17 +239,19 @@
|
|||
(fdport-data:channel
|
||||
(fdport-data (socket:inport sock))))
|
||||
(if (eq? res 0)
|
||||
(handle-EINPROGRESS sock)
|
||||
;; 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
|
||||
(errno-msg val)
|
||||
%connect
|
||||
sock
|
||||
name)))
|
||||
(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 (not (zero? val))
|
||||
(errno-error val "scheme_connect" %connect))))
|
||||
|
||||
(import-os-error-syscall %connect (sockfd family name) "scheme_connect")
|
||||
|
||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
|
Loading…
Reference in New Issue