Skip to content
Snippets Groups Projects
Commit 9ca63c56 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 9352528d
Branches
Tags
No related merge requests found
...@@ -286,7 +286,7 @@ class GmshServer : public GmshSocket{ ...@@ -286,7 +286,7 @@ class GmshServer : public GmshSocket{
virtual ~GmshServer(){} virtual ~GmshServer(){}
virtual int SystemCall(const char *str) = 0; virtual int SystemCall(const char *str) = 0;
virtual int NonBlockingWait(int socket, int num, double waitint) = 0; virtual int NonBlockingWait(int socket, int num, double waitint) = 0;
int StartClient(const char *command, const char *sockname=0, int maxdelay=4) int StartClient(const char *command, const char *sockname=0, int timeout=5)
{ {
bool justwait = (!command || !strlen(command)); bool justwait = (!command || !strlen(command));
_sockname = sockname; _sockname = sockname;
...@@ -365,9 +365,9 @@ class GmshServer : public GmshSocket{ ...@@ -365,9 +365,9 @@ class GmshServer : public GmshSocket{
} }
} }
else{ else{
// Wait at most maxdelay seconds for data, issue error if no // Wait at most timeout seconds for data, issue error if no
// connection in that amount of time // connection in that amount of time
if(!Select(tmpsock, maxdelay, 0)){ if(!Select(tmpsock, timeout, 0)){
CloseSocket(tmpsock); CloseSocket(tmpsock);
return -4; // Error: Socket listening timeout return -4; // Error: Socket listening timeout
} }
......
...@@ -82,7 +82,7 @@ int Solver(int num, const char *args) ...@@ -82,7 +82,7 @@ int Solver(int num, const char *args)
#if !defined(WIN32) #if !defined(WIN32)
command += " &"; command += " &";
#endif #endif
server->StartClient(command.c_str(), 0, 4.0); server->StartClient(command.c_str());
return 1; return 1;
} }
} }
...@@ -125,7 +125,7 @@ int Solver(int num, const char *args) ...@@ -125,7 +125,7 @@ int Solver(int num, const char *args)
#endif #endif
} }
int sock = server->StartClient(command.c_str(), sockname.c_str(), 4.0); int sock = server->StartClient(command.c_str(), sockname.c_str());
if(sock < 0) { if(sock < 0) {
switch (sock) { switch (sock) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment