Hi Kurt, write system call returns -1 and when I read the errno, I see 32 (broken pipe).
O.K. that could mean, you're trying to write to a local socket that has been closed. So now, you need to figure out why the socket was closed. There are several reasons:
-
the remote end closed it with a RST or FIN
-
the OS closed it due to some timeout
-
your code closed it, due to a bug
-
the OS closed it due to resource exhaustion (rather unlikely)
Cause 1.:
You should see a FIN or RST in the network capture, coming from the remote end.
Cause 2.:
You should should see a FIN or RST, coming from your local machine (depends on the OS settings). Is there a longer period of inactivity when you try to write to the socket?
Cause 3.:
Well, start a debugger ;-)
Cause 4.:
Even harder to detect. If you're lucky, you'll see a FIN or RST in the network capture.
Regards
Kurt
where do you get that error message?
Hi Kurt, write system call returns -1 and when I read the errno, I see 32 (broken pipe).