Remove pread
This commit is contained in:
parent
30980fcbad
commit
846881130f
2
irc.go
2
irc.go
@ -291,7 +291,6 @@ func (irc *Connection) ErrorChan() chan error {
|
|||||||
func (irc *Connection) Disconnect() {
|
func (irc *Connection) Disconnect() {
|
||||||
close(irc.end)
|
close(irc.end)
|
||||||
close(irc.pwrite)
|
close(irc.pwrite)
|
||||||
close(irc.pread)
|
|
||||||
|
|
||||||
irc.Wait()
|
irc.Wait()
|
||||||
irc.socket.Close()
|
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.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.pwrite = make(chan string, 10)
|
||||||
irc.Error = make(chan error, 2)
|
irc.Error = make(chan error, 2)
|
||||||
irc.Add(3)
|
irc.Add(3)
|
||||||
|
@ -24,10 +24,10 @@ type Connection struct {
|
|||||||
PingFreq time.Duration
|
PingFreq time.Duration
|
||||||
KeepAlive time.Duration
|
KeepAlive time.Duration
|
||||||
|
|
||||||
socket net.Conn
|
socket net.Conn
|
||||||
netsock net.Conn
|
netsock net.Conn
|
||||||
pread, pwrite chan string
|
pwrite chan string
|
||||||
end chan struct{}
|
end chan struct{}
|
||||||
|
|
||||||
nick string //The nickname we want.
|
nick string //The nickname we want.
|
||||||
nickcurrent string //The nickname we currently have.
|
nickcurrent string //The nickname we currently have.
|
||||||
|
Loading…
Reference in New Issue
Block a user