diff options
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index 8a46414d2..1638d7e0c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -807,9 +807,18 @@ connection_client_cancel_impl (struct GNUNET_MQ_Handle *mq, | |||
807 | { | 807 | { |
808 | struct ClientConnectionState *state = impl_state; | 808 | struct ClientConnectionState *state = impl_state; |
809 | 809 | ||
810 | GNUNET_assert (NULL != state->th); | 810 | if (NULL != state->th) |
811 | GNUNET_CLIENT_notify_transmit_ready_cancel (state->th); | 811 | { |
812 | state->th = NULL; | 812 | GNUNET_CLIENT_notify_transmit_ready_cancel (state->th); |
813 | state->th = NULL; | ||
814 | } | ||
815 | else if (NULL != mq->continue_task) | ||
816 | { | ||
817 | GNUNET_SCHEDULER_cancel (mq->continue_task); | ||
818 | mq->continue_task = NULL; | ||
819 | } | ||
820 | else | ||
821 | GNUNET_assert (0); | ||
813 | } | 822 | } |
814 | 823 | ||
815 | 824 | ||