summaryrefslogtreecommitdiff
path: root/LocalListener.cpp
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2020-08-11 22:35:12 +0100
committerThomas Preud'homme <robotux@celest.fr>2020-08-11 22:35:12 +0100
commit3ac113857071fc1f225b2e1b42547269e568c6b7 (patch)
tree8b28dd9c44a0d3c7ab8187cd8d8f19d47591d813 /LocalListener.cpp
parent9b10c21f5cad0e2ec27d23c59e65af7141a226f3 (diff)
New upstream version 2.2.4.4
Diffstat (limited to 'LocalListener.cpp')
-rwxr-xr-x[-rw-r--r--]LocalListener.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/LocalListener.cpp b/LocalListener.cpp
index 4a418aa..6983b10 100644..100755
--- a/LocalListener.cpp
+++ b/LocalListener.cpp
@@ -83,6 +83,7 @@ bool LocalListener::tryConnect()
int byteWriten =
#endif
localSocket.write(blockToSend);
+ localSocket.readAll();
#ifdef ULTRACOPIER_DEBUG
if(!localSocket.isValid())
ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"localSocket is not valid!");
@@ -92,7 +93,7 @@ bool LocalListener::tryConnect()
ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"blockToSend("+std::to_string(blockToSend.size())+
")!=byteWriten("+std::to_string(byteWriten)+")");
#endif // ULTRACOPIER_DEBUG
- if(localSocket.waitForBytesWritten(200))
+ if(localSocket.waitForBytesWritten())
{
ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Block send correctly");
}
@@ -107,7 +108,12 @@ bool LocalListener::tryConnect()
}
while(block.size());
ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"disconnect the socket");
+ localSocket.readAll();
+ localSocket.waitForBytesWritten();
+ QThread::msleep(50);
localSocket.disconnectFromServer();
+ QThread::msleep(50);
+ localSocket.waitForDisconnected();
return true;
}
else