0

What is the meaning of the "socket hang up" error?

If I’m not mistaken, it means that the peer has closed the connection. In that case, how is it different from the "connection reset by peer" error?

Can "socket hang up" appear on non-stream sockets, like UDP?

Community
  • 1
  • 1
  • @hmedia1 NodeJS? I found this error while reading `man 2 poll` actually… I have no idea about NodeJS. –  May 20 '17 at 00:29

1 Answers1

0

POLLHUP is a poll event. It isn't an errno value. ECONNRESET is an errno value. They are not mutually exclusive. The connection can however also be reset by the local end, if it has experienced longstanding transmit errors.

It doesn't happen on UDP sockets.

user207421
  • 305,947
  • 44
  • 307
  • 483