Skip to content

Commit

Permalink
windows: wrap the error with context info in eventloop.close()
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Jul 3, 2024
1 parent e91e9b3 commit c7fa145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eventloop_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"bytes"
"context"
"errors"
"fmt"
"runtime"
"sync/atomic"
"time"
Expand Down Expand Up @@ -195,7 +196,7 @@ func (el *eventloop) close(c *conn, err error) error {
err = c.rawConn.Close()
c.release()
if err != nil {
return err
return fmt.Errorf("failed to close connection=%s in event-loop(%d): %v", c.remoteAddr, el.idx, err)
}

return el.handleAction(c, action)
Expand Down

0 comments on commit c7fa145

Please sign in to comment.