1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-13 11:03:19 +00:00

Test write(). Fix bug where return of Flush() was not checked.

This commit is contained in:
Alex Bramley 2011-11-11 10:17:17 +00:00
parent 19ea7138e5
commit dc524420b0
2 changed files with 55 additions and 8 deletions

View file

@ -261,7 +261,11 @@ func (conn *Conn) write(line string) {
conn.shutdown()
return
}
conn.io.Flush()
if err := conn.io.Flush(); err != nil {
conn.l.Error("irc.send(): %s", err.String())
conn.shutdown()
return
}
conn.l.Debug("-> %s", line)
}