diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-03-21 20:07:32 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-03-22 10:17:28 (GMT) |
commit | 3c94f70a2e2c8e9f6a6cfc952837f18568c9bc4c (patch) | |
tree | 72971ed41d0e0ac61069e5c5e42adef0e876ae24 /src/network/socket | |
parent | 32a43ac64aee529c55af77edbbe34c54cb8f5e52 (diff) | |
download | Qt-3c94f70a2e2c8e9f6a6cfc952837f18568c9bc4c.zip Qt-3c94f70a2e2c8e9f6a6cfc952837f18568c9bc4c.tar.gz Qt-3c94f70a2e2c8e9f6a6cfc952837f18568c9bc4c.tar.bz2 |
Fix crashing debug message
When testing the socks5 socket engine, it closes the socket from
within _q_controlSocketError. Frequently a data abort occurs after this
when printing the debug message.
Moved the debug message before emitting the signal to avoid this.
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/socket')
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 801556e..9c96e1c 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -752,11 +752,11 @@ bool QAbstractSocketPrivate::flush() if (written < 0) { socketError = socketEngine->error(); q->setErrorString(socketEngine->errorString()); - emit q->error(socketError); - // an unexpected error so close the socket. #if defined (QABSTRACTSOCKET_DEBUG) qDebug() << "QAbstractSocketPrivate::flush() write error, aborting." << socketEngine->errorString(); #endif + emit q->error(socketError); + // an unexpected error so close the socket. q->abort(); return false; } |