Skip to content

Commit

Permalink
chore: return error when loopRegister fails
Browse files Browse the repository at this point in the history
  • Loading branch information
panjf2000 committed Nov 21, 2021
1 parent c8965ec commit c40b4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eventloop_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (el *eventloop) loopRegister(itf interface{}) error {
if err := el.poller.AddRead(c.pollAttachment); err != nil {
_ = unix.Close(c.fd)
c.releaseTCP()
return nil
return err
}
el.connections[c.fd] = c
return el.loopOpen(c)
Expand Down

0 comments on commit c40b4b6

Please sign in to comment.