From 846881130f18bc10e4c48edd847f3327780fff69 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Mon, 14 Jul 2014 17:05:06 -0700 Subject: [PATCH] Remove pread --- irc.go | 2 -- irc_struct.go | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) 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.