Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
2e06b95e
Commit
2e06b95e
authored
Jan 09, 2013
by
Max-Wilhelm Bruker
Browse files
deadlock fix
parent
733aa6c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
servatrice/src/serversocketinterface.cpp
View file @
2e06b95e
...
...
@@ -72,7 +72,10 @@ ServerSocketInterface::ServerSocketInterface(Servatrice *_server, Servatrice_Dat
socket
->
setSocketOption
(
QAbstractSocket
::
LowDelayOption
,
1
);
connect
(
socket
,
SIGNAL
(
readyRead
()),
this
,
SLOT
(
readClient
()));
connect
(
socket
,
SIGNAL
(
error
(
QAbstractSocket
::
SocketError
)),
this
,
SLOT
(
catchSocketError
(
QAbstractSocket
::
SocketError
)));
connect
(
this
,
SIGNAL
(
outputQueueChanged
()),
this
,
SLOT
(
flushOutputQueue
()));
// Never call flushOutputQueue directly from outputQueueChanged. In case of a socket error,
// it could lead to this object being destroyed while another function is still on the call stack. -> mutex deadlocks etc.
connect
(
this
,
SIGNAL
(
outputQueueChanged
()),
this
,
SLOT
(
flushOutputQueue
()),
Qt
::
QueuedConnection
);
}
ServerSocketInterface
::~
ServerSocketInterface
()
...
...
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