Commit 2d8e2482 authored by Adam Langley's avatar Adam Langley

crypto/tls: make SetReadTimeout work.

        Fixes #1181.

R=rsc, agl1, cw, r2
CC=golang-dev
https://golang.org/cl/2414041
parent f6e2eab8
...@@ -598,7 +598,10 @@ func (c *Conn) Read(b []byte) (n int, err os.Error) { ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment