mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added more detailed timeout for data transfer between ResInsight and Octave
p4#: 22148
This commit is contained in:
@@ -9,12 +9,10 @@ void getGridDimensions(int32NDArray& gridDimensions, const QString &hostName, qu
|
||||
QString serverName = hostName;
|
||||
quint16 serverPort = port;
|
||||
|
||||
const int Timeout = 5 * 1000;
|
||||
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(serverName, serverPort);
|
||||
|
||||
if (!socket.waitForConnected(Timeout))
|
||||
if (!socket.waitForConnected(riOctavePlugin::connectTimeOutMilliSecs))
|
||||
{
|
||||
error((("Connection: ") + socket.errorString()).toLatin1().data());
|
||||
return;
|
||||
@@ -35,7 +33,7 @@ void getGridDimensions(int32NDArray& gridDimensions, const QString &hostName, qu
|
||||
|
||||
while (socket.bytesAvailable() < (int)(sizeof(quint64)))
|
||||
{
|
||||
if (!socket.waitForReadyRead(Timeout))
|
||||
if (!socket.waitForReadyRead(riOctavePlugin::shortTimeOutMilliSecs))
|
||||
{
|
||||
error((("Waiting for header: ") + socket.errorString()).toLatin1().data());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user