Current implementation has the following defects:
* The socket stream ends up with a bogus name as it is created before the socket is connected, making things harder to debug than they need to be.
* In case of error, SB-BSD-SOCKETS:SOCKET-CLOSE was not being called with :ABORT T.
* A unwind from SOCKET-CONNECT that didn't go through the handler leaked an FD.
* An innocent non-error SIGNAL for any reason during SOCKET-CONNECT was taken to be a fatal error due to the handler on type T.
* On datagram sockets CONNECTED-P wasn't set.
Attached patch addresses these issues. Not deeply tested, though.
Cheers,
-- Nikodemus
Hi, Nikodemus
Thanks for pointing out this and supply a professional patch. I think your patch is very reasonable. And I've tested your patch on Hunchentoot, no issue found.
So I directly merged it as r575 of USOCKET trunk [1].
Thanks, again.
Chun Tian (binghe)
[1] svn://common-lisp.net/project/usocket/svn/usocket/trunk
Current implementation has the following defects:
- The socket stream ends up with a bogus name as it is created before
the socket is connected, making things harder to debug than they need to be.
- In case of error, SB-BSD-SOCKETS:SOCKET-CLOSE was not being called
with :ABORT T.
A unwind from SOCKET-CONNECT that didn't go through the handler leaked an FD.
An innocent non-error SIGNAL for any reason during SOCKET-CONNECT
was taken to be a fatal error due to the handler on type T.
- On datagram sockets CONNECTED-P wasn't set.
Attached patch addresses these issues. Not deeply tested, though.
Cheers,
-- Nikodemus <sbcl-socket-connect.diff>_______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel