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

[LW] SOCKET-SEND and SOCKET-RECEIVE should never return NIL (comes from raise-usock-err) (#62)

parent 2d9fc563
......@@ -598,9 +598,9 @@
(let ((errno #-win32 (lw:errno-value)
#+win32 (wsa-get-last-error)))
(if (zerop errno)
(raise-usock-err errno socket-fd host)))))))
(unless (zerop errno)
(raise-usock-err errno socket-fd host))
(defmethod socket-receive ((socket datagram-usocket) buffer length &key timeout (max-buffer-size +max-datagram-packet-size+))
"Receive message from socket, read-timeout is a float number in seconds.
......@@ -662,9 +662,9 @@
:copy-foreign-object nil)))
(let ((errno #-win32 (lw:errno-value)
#+win32 (wsa-get-last-error)))
(if (zerop errno)
(values nil n 0 0)
(raise-usock-err errno socket-fd)))))))))
(unless (zerop errno)
(raise-usock-err errno socket-fd))
(values nil n 0 0))))))))
(defmethod get-local-name ((usocket usocket))
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