Skip to content

Commit aad6d72

Browse files
mitchellwrosenbgamari
authored andcommitted
Fix bug in send
1 parent 6571843 commit aad6d72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Deprecate `NN_LINGER` option
33
* Improve testsuite reliability
44
* Add support for `NN_RCVMAXSIZE` option
5+
* Fixed bug in nonblocking send where `threadWaitWrite` was used instead of
6+
`threadWaitRead`
57

68
0.2.4
79
* Bumped upper bound on binary

src/Nanomsg.hsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ send (Socket t sid) string =
469469
throwErrnoIfMinus1RetryMayBlock_
470470
"send"
471471
(c_nn_send sid ptr (fromIntegral len) (#const NN_DONTWAIT))
472-
(getOptionFd (Socket t sid) (#const NN_SNDFD) >>= threadWaitWrite)
472+
(getOptionFd (Socket t sid) (#const NN_SNDFD) >>= threadWaitRead)
473473

474474
-- | Blocking receive.
475475
recv :: Receiver a => Socket a -> IO ByteString

0 commit comments

Comments
 (0)