make other threads exit if there's an error in one
This commit is contained in:
parent
9fa6da3c5c
commit
f4980d9fc2
1
irc.go
1
irc.go
@ -198,6 +198,7 @@ func (irc *Connection) Loop() {
|
|||||||
errChan := irc.ErrorChan()
|
errChan := irc.ErrorChan()
|
||||||
for !irc.isQuitting() {
|
for !irc.isQuitting() {
|
||||||
err := <-errChan
|
err := <-errChan
|
||||||
|
close(irc.end)
|
||||||
irc.Wait()
|
irc.Wait()
|
||||||
for !irc.isQuitting() {
|
for !irc.isQuitting() {
|
||||||
irc.Log.Printf("Error, disconnected: %s\n", err)
|
irc.Log.Printf("Error, disconnected: %s\n", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user