I have a C++ server and client.
I am using the poll() system call to monitor sockets on the server for read-ready, write-ready and errors.
For some of the connections, I see the poll() detects an ECONNRESET after sending out a bunch of data and fails midway. On the client side too, I see a ECONNRESET being reported.
So essentially both sides are reporting that the remote side closed the connection.
How can this happen? How do I debug this? Is there any tcp layer logging that I can enable?