event/Loop: Break() is no-op if "quit" is already set

This commit is contained in:
Max Kellermann
2017-02-10 22:13:13 +01:00
parent 822724d1aa
commit 115af4f565

View File

@@ -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();
} }