From 1fe11ca937bf385fcec6d257244525495bc1256f Mon Sep 17 00:00:00 2001 From: tj Date: Mon, 11 Oct 2010 21:17:17 +0200 Subject: [PATCH] Kill channels for fater retry --- irc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/irc.go b/irc.go index e11626c..9c5d260 100644 --- a/irc.go +++ b/irc.go @@ -62,7 +62,7 @@ func writer(irc *IRCConnection) { for !error { b := []byte(<-irc.pwrite) if b == nil || irc.socket == nil { - return + break } _, err := irc.socket.Write(b) if err != nil { @@ -108,6 +108,8 @@ func (irc *IRCConnection) SendRaw(message string) { } func (i *IRCConnection) Reconnect() os.Error { + close(i.pwrite) + close(i.pread) <-i.syncreader <-i.syncwriter for {