From b31387163769ceeeffa0037390f28d70ba530bc6 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 18 Jun 2017 01:13:26 +0200 Subject: [PATCH] SET: add another CADET bug workaround This time it's something that occurs pretty rarely, and only when sending the full set is triggered. --- src/set/gnunet-service-set_union.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index bb2acbf59..94910dd02 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c @@ -1869,23 +1869,27 @@ handle_union_p2p_full_done (void *cls, op); ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_UNION_P2P_FULL_DONE); - GNUNET_MQ_notify_sent (ev, - &send_client_done, - op); GNUNET_MQ_send (op->mq, ev); op->state->phase = PHASE_DONE; - /* we now wait until the other peer shuts the tunnel down*/ + /* we now wait until the other peer sends us the OVER message*/ } break; case PHASE_FULL_SENDING: { + struct GNUNET_MQ_Envelope *ev; + LOG (GNUNET_ERROR_TYPE_DEBUG, "got FULL DONE, finishing\n"); /* We sent the full set, and got the response for that. We're done. */ op->state->phase = PHASE_DONE; GNUNET_CADET_receive_done (op->channel); - send_client_done_and_destroy (op); + ev = GNUNET_MQ_msg_header (GNUNET_MESSAGE_TYPE_SET_UNION_P2P_OVER); + GNUNET_MQ_notify_sent (ev, + &send_client_done, + op); + GNUNET_MQ_send (op->mq, + ev); return; } break; -- 2.25.1