From 95f9076a2139f5fb042b944a0658b6cda2fa35db Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Apr 2016 08:17:37 +0000 Subject: implementing new scheduler shutdown semantics --- src/transport/plugin_transport_unix.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/transport/plugin_transport_unix.c') diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index e320785d4..d0566c2d3 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -1229,11 +1229,9 @@ unix_plugin_select_read (void *cls) { struct Plugin *plugin = cls; const struct GNUNET_SCHEDULER_TaskContext *tc; - - tc = GNUNET_SCHEDULER_get_task_context (); + plugin->read_task = NULL; - if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) - return; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) unix_plugin_do_read (plugin); plugin->read_task = @@ -1254,11 +1252,9 @@ unix_plugin_select_write (void *cls) { struct Plugin *plugin = cls; const struct GNUNET_SCHEDULER_TaskContext *tc; - - tc = GNUNET_SCHEDULER_get_task_context (); + plugin->write_task = NULL; - if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) - return; + tc = GNUNET_SCHEDULER_get_task_context (); if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) unix_plugin_do_write (plugin); if (NULL == plugin->msg_head) -- cgit v1.2.3