Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
19bda2d4
Commit
19bda2d4
authored
Oct 20, 2016
by
Michael Ott
Browse files
Check for POLLHUP when polling sockets
parent
fd792f6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
CollectAgent/simplemqttserverthread.cpp
View file @
19bda2d4
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment