diff --git a/iothread.c b/iothread.c index 44c8944dc4ed023874d1f65fafd57df241a1216a..59d08509883fdb779222c654dd3cdd75efbca483 100644 --- a/iothread.c +++ b/iothread.c @@ -85,7 +85,7 @@ static int iothread_stop(Object *object, void *opaque) IOThread *iothread; iothread = (IOThread *)object_dynamic_cast(object, TYPE_IOTHREAD); - if (!iothread || !iothread->ctx) { + if (!iothread || !iothread->ctx || iothread->stopping) { return 0; } iothread->stopping = true;