diff options
author | delthas <delthas@dille.cc> | 2022-02-26 20:59:46 +0100 |
---|---|---|
committer | delthas <delthas@dille.cc> | 2022-02-26 20:59:46 +0100 |
commit | 159853d7c369a67ef533e29a75e2a84b9cc5aa14 (patch) | |
tree | 779de41d014647ea4aec7c696e8818e6154b2781 /app.go | |
parent | Use delthas/tcell fork (diff) |
Drain the events channel when closing
This avoids rare cases where we try to send messages to the event
channel, but it is full and blocks the Close routine.
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -241,6 +241,11 @@ func (app *App) eventLoop() { app.win.Draw(currentMembers) } } + go func() { + // drain events until we close + for range app.events { + } + }() } // ircLoop maintains a connection to the IRC server by connecting and then |