Avoid calling SOCKET-OPTION twice in case of an error: the first call

will already clear the error status.
This commit is contained in:
mainzelm 2003-10-15 07:59:51 +00:00
parent 1f1081b8bf
commit 3198c650f8
1 changed files with 7 additions and 7 deletions

View File

@ -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")