mirror of
https://github.com/fluffle/goirc
synced 2025-05-12 18:44:50 +00:00
Make a timeout so that Conn.Err closes when the connection is lost
This commit is contained in:
parent
1de390cd3d
commit
7dc6308895
1 changed files with 1 additions and 0 deletions
|
@ -140,6 +140,7 @@ func (conn *Conn) Connect(host string, pass ...string) os.Error {
|
|||
conn.io = bufio.NewReadWriter(
|
||||
bufio.NewReader(conn.sock),
|
||||
bufio.NewWriter(conn.sock))
|
||||
conn.sock.SetTimeout(300000000000) // 5 minutes
|
||||
go conn.send()
|
||||
go conn.recv()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue