aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/qemud/qemud.c
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/qemud/qemud.c')
-rw-r--r--emulator/qemud/qemud.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/emulator/qemud/qemud.c b/emulator/qemud/qemud.c
index 5edf8a6..92b2a2b 100644
--- a/emulator/qemud/qemud.c
+++ b/emulator/qemud/qemud.c
@@ -849,6 +849,10 @@ fdhandler_close( FDHandler* f )
static void
fdhandler_shutdown( FDHandler* f )
{
+ /* prevent later fdhandler_close() to
+ * call the receiver's close.
+ */
+ f->receiver->close = NULL;
if (f->out_first != NULL && !f->closing)
{
@@ -856,11 +860,6 @@ fdhandler_shutdown( FDHandler* f )
f->closing = 1;
fdhandler_remove(f);
fdhandler_prepend(f, &f->list->closing);
-
- /* prevent later fdhandler_close() to
- * call the receiver's close.
- */
- f->receiver->close = NULL;
return;
}