Avoid calling SOCKET-OPTION twice in case of an error: the first call
will already clear the error status.
This commit is contained in:
parent
1f1081b8bf
commit
3198c650f8
|
@ -263,13 +263,13 @@
|
|||
(fdport-data
|
||||
(socket:outport sock))))
|
||||
'#())
|
||||
(if (not (connect-socket-successful? sock))
|
||||
(let ((errno (socket-option sock level/socket socket/error)))
|
||||
(errno-error errno
|
||||
(errno-msg errno)
|
||||
%connect
|
||||
sock
|
||||
name)))))))
|
||||
(let ((errno (socket-option sock level/socket socket/error)))
|
||||
(if (not (zero? errno))
|
||||
(errno-error errno
|
||||
(errno-msg errno)
|
||||
%connect
|
||||
sock
|
||||
name)))))))
|
||||
|
||||
(import-os-error-syscall %connect (sockfd family name) "scheme_connect")
|
||||
|
||||
|
|
Loading…
Reference in New Issue