diff options
author | Garrett D'Amore <garrett@damore.org> | 2018-11-21 20:53:46 -0800 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2018-11-21 20:53:46 -0800 |
commit | e40de97c0f0a45e3323116bef36539427bdf2ab9 (patch) | |
tree | 40c93c35d0635a726c4332a3692756885417f10f | |
parent | 1749fd7b039165a91b8d556b4df18e3e632ad830 (diff) | |
download | nanomsg-fix997.tar.gz |
fixes #997 Windows IPC Assertion failed: !self->pipesendbuffix997
-rw-r--r-- | src/aio/usock_win.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/aio/usock_win.inc b/src/aio/usock_win.inc index 5087f47..9ff3d8f 100644 --- a/src/aio/usock_win.inc +++ b/src/aio/usock_win.inc @@ -271,7 +271,7 @@ void nn_usock_accept (struct nn_usock *self, struct nn_usock *listener) int rc; BOOL brc; DWORD nbytes; - + /* NamedPipes have their own accepting mechanism. */ if (listener->domain == AF_UNIX) { nn_usock_accept_pipe (self, listener); @@ -403,7 +403,7 @@ void nn_usock_send (struct nn_usock *self, const struct nn_iovec *iov, memset (&self->out.olpd, 0, sizeof (self->out.olpd)); if (self->domain == AF_UNIX) { - /* TODO: Do not copy the buffer, find an efficent way to Write + /* TODO: Do not copy the buffer, find an efficent way to Write multiple buffers that doesn't affect the state machine. */ /* Ensure the total buffer size does not exceed size limitation @@ -910,6 +910,10 @@ static void nn_usock_handler (struct nn_fsm *self, int src, int type, return; case NN_WORKER_OP_ERROR: if (nn_usock_cancel_io (usock) == 0) { + if (usock->pipesendbuf) { + nn_free(usock->pipesendbuf); + usock->pipesendbuf = NULL; + } nn_fsm_raise(&usock->fsm, &usock->event_error, NN_USOCK_ERROR); nn_usock_close(usock); |