Skip to content

Commit ecc7335

Browse files
authored
Fix a bug in the dtor of EventLoop (#357)
1 parent a00f39b commit ecc7335

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

trantor/net/EventLoop.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ EventLoop::~EventLoop()
138138
#endif
139139
}
140140

141-
t_loopInThisThread = nullptr;
142141
#ifdef __linux__
143142
close(wakeupFd_);
144143
#elif defined _WIN32
@@ -256,7 +255,7 @@ void EventLoop::loop()
256255
{
257256
f();
258257
}
259-
258+
t_loopInThisThread = nullptr;
260259
// Throw the exception from the end
261260
if (loopException)
262261
{

0 commit comments

Comments
 (0)