Navigation Menu

Skip to content

Commit

Permalink
More detection of failed sockets.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 7, 2008
1 parent 6b468a6 commit 91ef336
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nph-offload.c
Expand Up @@ -1629,7 +1629,6 @@ static int serverMainline(int argc, char **argv, char **envp)
break; // select() and fstat() should have caught this...
} // if

#if 0
// see if the remote end shutdown their end of the socket
// (web browser user hit cancel, etc).
int deadsocket = 0;
Expand All @@ -1645,12 +1644,11 @@ static int serverMainline(int argc, char **argv, char **envp)
} // while
#endif

if (deadsocket || feof(stdout))
if (deadsocket || feof(stdout) || ferror(stdout))
{
debugEcho("EOF on stdout!");
break;
} // if
#endif

if ((br >= startRange) && (br < endRange))
{
Expand Down

0 comments on commit 91ef336

Please sign in to comment.