should probably be reading from conn.out after the test for closedness

This commit is contained in:
Alex Bramley 2009-12-19 14:58:41 +00:00
parent 36976f59d0
commit 7f6c8fc232
1 changed files with 1 additions and 1 deletions

View File

@ -116,10 +116,10 @@ func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastInd
// flood controlled using hybrid's algorithm if conn.Flood is true
func (conn *Conn) send() {
for {
line := <-conn.out
if closed(conn.out) {
break
}
line := <-conn.out
if err := conn.io.WriteString(line + "\r\n"); err != nil {
conn.error("irc.send(): %s", err.String())
conn.shutdown()