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
dd9f217e6a
commit
597324882f
5
conn.go
5
conn.go
@ -598,7 +598,10 @@ func (c *Conn) Read(b []byte) (n int, err os.Error) {
|
|||||||
defer c.in.Unlock()
|
defer c.in.Unlock()
|
||||||
|
|
||||||
for c.input == nil && c.err == nil {
|
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 {
|
if c.err != nil {
|
||||||
return 0, c.err
|
return 0, c.err
|
||||||
|
Loading…
Reference in New Issue
Block a user