summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-09-20 12:32:12 +0000
committerBart Polot <bart@net.in.tum.de>2012-09-20 12:32:12 +0000
commit87a8875eeebfaf98d3a8441adb3f227122e2aab3 (patch)
treed372f257bc59cd9785f29759331069d1c90ec7b8 /src
parent44f59242570e7bcf3ea760f8965fda627748f61a (diff)
- reorder for case of shutdown
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 914862c33..aa3bfea97 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -4339,13 +4339,13 @@ tunnel_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
struct MeshTunnel *t = cls;
struct GNUNET_PeerIdentity id;
+ t->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ return;
GNUNET_PEER_resolve(t->id.oid, &id);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Tunnel %s [%X] timed out. Destroying.\n",
GNUNET_i2s(&id), t->id.tid);
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
- t->timeout_task = GNUNET_SCHEDULER_NO_TASK;
tunnel_destroy (t);
}