diff options
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index bc13bbb36..a4691ff2c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -268,6 +268,9 @@ impl_send_continue (void *cls, | |||
268 | struct GNUNET_MQ_Handle *mq = cls; | 268 | struct GNUNET_MQ_Handle *mq = cls; |
269 | struct GNUNET_MQ_Envelope *current_envelope; | 269 | struct GNUNET_MQ_Envelope *current_envelope; |
270 | 270 | ||
271 | if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) | ||
272 | return; | ||
273 | |||
271 | mq->continue_task = GNUNET_SCHEDULER_NO_TASK; | 274 | mq->continue_task = GNUNET_SCHEDULER_NO_TASK; |
272 | /* call is only valid if we're actually currently sending | 275 | /* call is only valid if we're actually currently sending |
273 | * a message */ | 276 | * a message */ |
@@ -466,6 +469,12 @@ server_client_destroy_impl (struct GNUNET_MQ_Handle *mq, | |||
466 | { | 469 | { |
467 | struct ServerClientSocketState *state = impl_state; | 470 | struct ServerClientSocketState *state = impl_state; |
468 | 471 | ||
472 | if (NULL != state->th) | ||
473 | { | ||
474 | GNUNET_SERVER_notify_transmit_ready_cancel (state->th); | ||
475 | state->th = NULL; | ||
476 | } | ||
477 | |||
469 | GNUNET_assert (NULL != mq); | 478 | GNUNET_assert (NULL != mq); |
470 | GNUNET_assert (NULL != state); | 479 | GNUNET_assert (NULL != state); |
471 | GNUNET_SERVER_client_drop (state->client); | 480 | GNUNET_SERVER_client_drop (state->client); |