mirror of
https://github.com/golang/go
synced 2024-11-21 20:24:50 -07:00
crypto/tls: don't return an error from Close()
Fixes #1037. R=adg, rsc1 CC=golang-dev https://golang.org/cl/2107048
This commit is contained in:
parent
0f5830b9c3
commit
5011c27018
@ -445,7 +445,11 @@ func (c *Conn) sendAlertLocked(err alert) os.Error {
|
||||
}
|
||||
c.tmp[1] = byte(err)
|
||||
c.writeRecord(recordTypeAlert, c.tmp[0:2])
|
||||
return c.setError(&net.OpError{Op: "local error", Error: err})
|
||||
// closeNotify is a special case in that it isn't an error:
|
||||
if err != alertCloseNotify {
|
||||
return c.setError(&net.OpError{Op: "local error", Error: err})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// sendAlert sends a TLS alert message.
|
||||
|
Loading…
Reference in New Issue
Block a user