diff options
Diffstat (limited to 'src/set/gnunet-service-set.c')
-rw-r--r-- | src/set/gnunet-service-set.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index c40ac9c53..746a9da02 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c | |||
@@ -1388,6 +1388,7 @@ channel_end_cb (void *cls, | |||
1388 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1388 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1389 | "channel_end_cb called\n"); | 1389 | "channel_end_cb called\n"); |
1390 | op->channel = NULL; | 1390 | op->channel = NULL; |
1391 | op->keep++; | ||
1391 | /* the vt can be null if a client already requested canceling op. */ | 1392 | /* the vt can be null if a client already requested canceling op. */ |
1392 | if (NULL != op->vt) | 1393 | if (NULL != op->vt) |
1393 | { | 1394 | { |
@@ -1395,7 +1396,8 @@ channel_end_cb (void *cls, | |||
1395 | "calling peer disconnect due to channel end\n"); | 1396 | "calling peer disconnect due to channel end\n"); |
1396 | op->vt->peer_disconnect (op); | 1397 | op->vt->peer_disconnect (op); |
1397 | } | 1398 | } |
1398 | if (GNUNET_YES != op->keep) | 1399 | op->keep--; |
1400 | if (0 == op->keep) | ||
1399 | { | 1401 | { |
1400 | /* cadet will never call us with the context again! */ | 1402 | /* cadet will never call us with the context again! */ |
1401 | GNUNET_free (op); | 1403 | GNUNET_free (op); |