I have a C socket
client program where one thread
is for receiving data and another for sending. If the server
shuts down then the sender gets EPIPE
. If I reconnect the same socket
then it can receive data but the sender still gets EPIPE
.
How to fix this?
Update: Actually sender seems to send data as I see number of byte sent. But errno is still set to broken pipe. Before I only checked errno. Shouldn't it be changed to successful?