diff --git a/OctavePlugin/riSetActiveCellProperty.cpp b/OctavePlugin/riSetActiveCellProperty.cpp index b4981a70cc..a079ccd0da 100644 --- a/OctavePlugin/riSetActiveCellProperty.cpp +++ b/OctavePlugin/riSetActiveCellProperty.cpp @@ -78,10 +78,12 @@ void setEclipseProperty(const Matrix& propertyFrames, const QString &hostName, q while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState) { // octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl; - socket.waitForBytesWritten(riOctavePlugin::longTimeOutMilliSecs); + socket.waitForBytesWritten(riOctavePlugin::shortTimeOutMilliSecs); OCTAVE_QUIT; } + //octave_stdout << " Socket write completed" << std::endl; + if (socket.bytesToWrite() && socket.state() != QAbstractSocket::ConnectedState) { error("riSetActiveCellProperty : ResInsight refused to accept the data. Maybe the dimensions or porosity model is wrong"); diff --git a/OctavePlugin/riSetGridProperty.cpp b/OctavePlugin/riSetGridProperty.cpp index 8598d4b32e..3ef34adda4 100644 --- a/OctavePlugin/riSetGridProperty.cpp +++ b/OctavePlugin/riSetGridProperty.cpp @@ -102,7 +102,7 @@ void setEclipseProperty(const NDArray& propertyFrames, const QString &hostName, while(socket.bytesToWrite() && socket.state() == QAbstractSocket::ConnectedState) { // octave_stdout << "Bytes to write: " << socket.bytesToWrite() << std::endl << std::flush; - socket.waitForBytesWritten(riOctavePlugin::longTimeOutMilliSecs); + socket.waitForBytesWritten(riOctavePlugin::shortTimeOutMilliSecs); OCTAVE_QUIT; } diff --git a/OctavePlugin/riSettings.h b/OctavePlugin/riSettings.h index 5765244a6d..63ad778b37 100644 --- a/OctavePlugin/riSettings.h +++ b/OctavePlugin/riSettings.h @@ -21,7 +21,7 @@ namespace riOctavePlugin { const int connectTimeOutMilliSecs = 5000; - const int shortTimeOutMilliSecs = 5000; + const int shortTimeOutMilliSecs = 1000; const int longTimeOutMilliSecs = 6000000; const int socketMaxByteCount = 100000;