Skip to content

Commit

Permalink
Attempt to fix possible race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Sep 28, 2023
1 parent e7ee47b commit 5908013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/multiprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void MOMultiProcess::sendMessage(const QString& message)
}

socket.write(message.toUtf8());
if (!socket.waitForBytesWritten(s_Timeout)) {
if (socket.bytesToWrite() && !socket.waitForBytesWritten(s_Timeout)) {
reportError(
tr("failed to communicate with running process: %1").arg(socket.errorString()));
return;
Expand Down

0 comments on commit 5908013

Please sign in to comment.