Commit 2d9fc563 authored by Chun Tian (binghe)'s avatar Chun Tian (binghe)
Browse files

[LW] socket-accept returns NIL if the underlying socket is NIL and the error...

[LW] socket-accept returns NIL if the underlying socket is NIL and the error (somehow) is not captured
parent ade7ede9
0.8.4:
* [LW] SOCKET-ACCEPT now raises CONNECTION-ABPRTED-ERROR instead of INVALID-SOCKET-ERROR if the underlying socket got from comm::accept-connection-to-socket or comm::get-fd-from-socket is NIL. (#63)
0.8.3: (Dec 23, 2019)
* New experimental backend: Mezzano (contributed by Bruno Cichon, #51)
......
......@@ -491,21 +491,19 @@
#-win32
(comm::get-fd-from-socket (socket usocket))))
(stream (when socket
(make-instance 'comm:socket-stream
:socket socket
:direction :io
:element-type (or element-type
(element-type usocket))))))
(make-instance 'comm:socket-stream
:socket socket
:direction :io
:element-type (or element-type
(element-type usocket))))))
#+win32
(when socket
(setf (%ready-p usocket) nil))
;; It is possible that socket is NIL. Previously the call of make-stream-socket
;; raised a usocket:invalid-socket-error, now we let it raise
;; connection-aborted-error instead. (#63)
(if socket
(make-stream-socket :socket socket :stream stream)
(error 'connection-aborted-error))))
;; raised a usocket:invalid-socket-error
(when socket
(make-stream-socket :socket socket :stream stream))))
;; Sockets and their streams are different objects
;; close the stream in order to make sure buffers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment