Fixed Octave Hang after large dataset writes

https://github.com/OPM/ResInsight/issues/192
This commit is contained in:
Jacob Støren 2014-06-30 12:00:41 +02:00
parent 076601e0e5
commit 82e97da553
3 changed files with 5 additions and 3 deletions

View File

@ -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");

View File

@ -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;
}

View File

@ -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;