Skip to content

Commit

Permalink
Fix realNonblockingRead, set realNonblockingRead call error to `n…
Browse files Browse the repository at this point in the history
…onblockReadErr`
  • Loading branch information
codercms authored and jackc committed Mar 4, 2023
1 parent 087b8b2 commit 0dbb0a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/nbconn/nbconn_real_non_block_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 0dbb0a5

Please sign in to comment.