mirror of
https://github.com/golang/go
synced 2024-11-25 09:57:57 -07:00
crypto/tls: make SetReadTimeout work.
Fixes #1181. R=rsc, agl1, cw, r2 CC=golang-dev https://golang.org/cl/2414041
This commit is contained in:
parent
f6e2eab8e0
commit
2d8e2482cc
@ -598,7 +598,10 @@ func (c *Conn) Read(b []byte) (n int, err os.Error) {
|
||||
defer c.in.Unlock()
|
||||
|
||||
for c.input == nil && c.err == nil {
|
||||
c.readRecord(recordTypeApplicationData)
|
||||
if err := c.readRecord(recordTypeApplicationData); err != nil {
|
||||
// Soft error, like EAGAIN
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
if c.err != nil {
|
||||
return 0, c.err
|
||||
|
Loading…
Reference in New Issue
Block a user