summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aio/usock_win.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/aio/usock_win.inc b/src/aio/usock_win.inc
index 0af756d..ccbd607 100644
--- a/src/aio/usock_win.inc
+++ b/src/aio/usock_win.inc
@@ -998,6 +998,17 @@ static void nn_usock_handler (struct nn_fsm *self, int src, int type,
return;
+ case NN_WORKER_OP_ERROR:
+ nn_usock_close(usock->asock);
+ usock->asock->state = NN_USOCK_STATE_DONE;
+ nn_fsm_raise (&usock->asock->fsm, &usock->asock->event_error,
+ NN_USOCK_ERROR);
+ usock->asock->asock = NULL;
+ usock->asock = NULL;
+ /* Wait till the user starts accepting once again. */
+ usock->state = NN_USOCK_STATE_LISTENING;
+ return;
+
default:
nn_fsm_bad_action (usock->state, src, type);
}