diff options
Diffstat (limited to 'src/dev/ethertap.cc')
-rw-r--r-- | src/dev/ethertap.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dev/ethertap.cc b/src/dev/ethertap.cc index 94e381a8e..e14fd90c2 100644 --- a/src/dev/ethertap.cc +++ b/src/dev/ethertap.cc @@ -106,6 +106,11 @@ TapListener::listen() void TapListener::accept() { + // As a consequence of being called from the PollQueue, we might + // have been called from a different thread. Migrate to "our" + // thread. + EventQueue::ScopedMigration migrate(tap->eventQueue()); + if (!listener.islistening()) panic("TapListener(accept): cannot accept if we're not listening!"); |