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
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ EventLoop::~EventLoop()
void
EventLoop::Break()
{
if (quit)
return;
quit = true;
wake_fd.Write();
}