in reply to Problem Keeping Socket Alive
One problem is that the timeout method "sets the timeout interval that's used when performing I/O or connecting to a port. When a method doesn't complete within the timeout interval then it's an error and the error mode action is performed." If the remote process isn't going to output something for 7 days then you should disconnect from the socket, sleep(604800) and then reconnect. In other words, lower your timeout value and look elsewhere for the problem.
Another problem is that you assume that the process runs all the time and that there will never be a loss of connectivity. How about checking that the connection still exists before (or when) trying to read from the socket?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Problem Keeping Socket Alive
by skamerman (Initiate) on Dec 23, 2002 at 17:05 UTC | |
by waswas-fng (Curate) on Dec 23, 2002 at 18:02 UTC | |
by skamerman (Initiate) on Dec 23, 2002 at 18:21 UTC | |
by waswas-fng (Curate) on Dec 23, 2002 at 19:11 UTC | |
by skamerman (Initiate) on Dec 23, 2002 at 20:30 UTC | |
by skamerman (Initiate) on Dec 23, 2002 at 21:21 UTC | |
|