[Bese-devel] Bugfix in trivial-sockets SBCL backend
Marijn Haverbeke
marijnh at gmail.com
Thu Sep 21 09:56:37 UTC 2006
(With trivial-sockets being unmaintained, I'm sending this patch here so
that people who use it can update their own versions -- I guess we'll have
to either move to usocket or branch trivial-sockets sometime soon).
When an error like 'connection refused' occurs when opening a socket,
trivial-sockets leaks a socket handle - it doesn't return a stream but it
did create a socket, and there's some strangeness in SBCL that makes it okay
to just close the stream for a socket when you're done with it, but if you
don't get a stream you should explicitly close the socket object itself. The
attached patch makes trivial-sockets close the socket when it fails to
create a stream.
Regards,
Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060921/dbd001f5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: socket-leak.patch
Type: application/octet-stream
Size: 1837 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060921/dbd001f5/attachment.obj>
More information about the bese-devel
mailing list