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
|
// flood controlled using hybrid's algorithm if conn.Flood is true
|
||||||
func (conn *Conn) send() {
|
func (conn *Conn) send() {
|
||||||
for {
|
for {
|
||||||
line := <-conn.out
|
|
||||||
if closed(conn.out) {
|
if closed(conn.out) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
line := <-conn.out
|
||||||
if err := conn.io.WriteString(line + "\r\n"); err != nil {
|
if err := conn.io.WriteString(line + "\r\n"); err != nil {
|
||||||
conn.error("irc.send(): %s", err.String())
|
conn.error("irc.send(): %s", err.String())
|
||||||
conn.shutdown()
|
conn.shutdown()
|
||||||
|
|
Loading…
Reference in New Issue