Properly remove listener when listen() times out
authorMartin Willi <martin@revosec.ch>
Wed, 31 Aug 2011 14:42:02 +0000 (16:42 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 31 Aug 2011 14:50:06 +0000 (16:50 +0200)
src/libcharon/bus/bus.c

index 74bd0ec..bf0ab22 100644 (file)
@@ -182,6 +182,7 @@ METHOD(bus_t, listen_, bool,
                        if (data.entry->condvar->timed_wait_abs(data.entry->condvar,
                                                                                                    this->mutex, tv))
                        {
+                               this->listeners->remove(this->listeners, data.entry, NULL);
                                timed_out = TRUE;
                                break;
                        }