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:
Adam Langley 2010-10-11 10:41:01 -04:00
parent dd9f217e6a
commit 597324882f

View File

@ -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