mirror of https://github.com/jackc/pgx.git
Fix `realNonblockingRead`, set `realNonblockingRead` call error to `nonblockReadErr`
parent
087b8b2ba8
commit
0dbb0a52ab
|
@ -96,7 +96,7 @@ func (c *NetConn) realNonblockingRead(b []byte) (n int, err error) {
|
|||
c.nonblockReadFunc = func(fd uintptr) (done bool) {
|
||||
// Make sock non-blocking
|
||||
if err := setSockMode(fd, sockModeNonBlocking); err != nil {
|
||||
c.nonblockWriteErr = err
|
||||
c.nonblockReadErr = err
|
||||
return true
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ func (c *NetConn) realNonblockingRead(b []byte) (n int, err error) {
|
|||
|
||||
// Make sock blocking again
|
||||
if err := setSockMode(fd, sockModeBlocking); err != nil {
|
||||
c.nonblockWriteErr = err
|
||||
c.nonblockReadErr = err
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue