aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-11-05 12:05:29 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-12-08 16:08:58 +0100
commit1ec753f7340677ac4fbef53fbdc73feff344719d (patch)
tree46e7a77de8b70476ecff3f708515c1963871c454 /src/qt
parent814429dc722837dbe57965c6a37f4ea57206d270 (diff)
[Qt] ensure socket is set to NULL in PaymentServer::ipcSendCommandLine
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/paymentserver.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 417945bbf8..c65c980705 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;
}