event/Loop: Break() is no-op if "quit" is already set
This commit is contained in:
@@ -46,6 +46,9 @@ EventLoop::~EventLoop()
|
|||||||
void
|
void
|
||||||
EventLoop::Break()
|
EventLoop::Break()
|
||||||
{
|
{
|
||||||
|
if (quit)
|
||||||
|
return;
|
||||||
|
|
||||||
quit = true;
|
quit = true;
|
||||||
wake_fd.Write();
|
wake_fd.Write();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user