mirror of https://github.com/fluffle/goirc
should probably be reading from conn.out after the test for closedness
This commit is contained in:
parent
36976f59d0
commit
7f6c8fc232
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue