diff --git a/irc.go b/irc.go index 84cb6f0..b29fce8 100644 --- a/irc.go +++ b/irc.go @@ -291,7 +291,6 @@ func (irc *Connection) ErrorChan() chan error { func (irc *Connection) Disconnect() { close(irc.end) close(irc.pwrite) - close(irc.pread) irc.Wait() irc.socket.Close() @@ -360,7 +359,6 @@ func (irc *Connection) Connect(server string) error { } irc.Log.Printf("Connected to %s (%s)\n", irc.server, irc.socket.RemoteAddr()) - irc.pread = make(chan string, 10) irc.pwrite = make(chan string, 10) irc.Error = make(chan error, 2) irc.Add(3) diff --git a/irc_struct.go b/irc_struct.go index a630b43..1e582aa 100644 --- a/irc_struct.go +++ b/irc_struct.go @@ -24,10 +24,10 @@ type Connection struct { PingFreq time.Duration KeepAlive time.Duration - socket net.Conn - netsock net.Conn - pread, pwrite chan string - end chan struct{} + socket net.Conn + netsock net.Conn + pwrite chan string + end chan struct{} nick string //The nickname we want. nickcurrent string //The nickname we currently have.