diff options
| author | Philip Kaufmann <[email protected]> | 2014-11-05 12:05:29 +0100 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2014-12-08 16:08:58 +0100 |
| commit | 1ec753f7340677ac4fbef53fbdc73feff344719d (patch) | |
| tree | 46e7a77de8b70476ecff3f708515c1963871c454 /src/qt/paymentserver.cpp | |
| parent | [Qt] add BIP70/BIP71 constants for all messages and mime types (diff) | |
| download | discoin-1ec753f7340677ac4fbef53fbdc73feff344719d.tar.xz discoin-1ec753f7340677ac4fbef53fbdc73feff344719d.zip | |
[Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLine
Diffstat (limited to 'src/qt/paymentserver.cpp')
| -rw-r--r-- | src/qt/paymentserver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index 417945bbf..c65c98070 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -263,6 +263,7 @@ bool PaymentServer::ipcSendCommandLine() if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT)) { delete socket; + socket = NULL; return false; } @@ -271,12 +272,14 @@ bool PaymentServer::ipcSendCommandLine() out.setVersion(QDataStream::Qt_4_0); out << r; out.device()->seek(0); + socket->write(block); socket->flush(); - socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT); socket->disconnectFromServer(); + delete socket; + socket = NULL; fResult = true; } |