Commit 19bda2d4 authored by Michael Ott's avatar Michael Ott
Browse files

Check for POLLHUP when polling sockets

parent fd792f6d
......@@ -291,6 +291,10 @@ void SimpleMQTTServerMessageThread::run()
cout << "fd(" << fds[connectionId].fd << ") revents: " << hex << fds[connectionId].revents << dec << "\n";
coutMtx.unlock();
#endif
/* Remote side hung up */
if (fds[connectionId].revents & POLLHUP) {
releaseConnection(connectionId);
}
if (fds[connectionId].revents & POLLIN) {
char* readPtr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment