Manually managing deadlines is going to *suck*.

This commit is contained in:
Alex Bramley 2012-02-04 01:12:41 +00:00
parent b23215d09b
commit dfb6f94b56
1 changed files with 0 additions and 5 deletions

View File

@ -54,9 +54,6 @@ type Conn struct {
SSL bool SSL bool
SSLConfig *tls.Config SSLConfig *tls.Config
// Socket timeout, in seconds. Defaulted to 5m in New().
Timeout int64
// Set this to true to disable flood protection and false to re-enable // Set this to true to disable flood protection and false to re-enable
Flood bool Flood bool
@ -97,7 +94,6 @@ func Client(nick, ident, name string,
cLoop: make(chan bool), cLoop: make(chan bool),
SSL: false, SSL: false,
SSLConfig: nil, SSLConfig: nil,
Timeout: 300,
Flood: false, Flood: false,
badness: 0, badness: 0,
lastsent: 0, lastsent: 0,
@ -191,7 +187,6 @@ func (conn *Conn) postConnect() {
conn.io = bufio.NewReadWriter( conn.io = bufio.NewReadWriter(
bufio.NewReader(conn.sock), bufio.NewReader(conn.sock),
bufio.NewWriter(conn.sock)) bufio.NewWriter(conn.sock))
conn.sock.SetTimeout(conn.Timeout * second)
go conn.send() go conn.send()
go conn.recv() go conn.recv()
go conn.runLoop() go conn.runLoop()