Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : Re: 10054 Connection was reset by peer
| Subject: | Re: 10054 Connection was reset by peer |
| Posted by: | "Guillem" (guillemvicens-nospam@clubgreenoasis.com) |
| Date: | 22 Aug 2006 03:01:50 |
Gerhard Venter wrote:
> Hi Guillem, thanks for the reply.
>
> Well it must be the way Windows does it because I can reset the
> connection to a Linux server without any problems. I have the
> following setup:
>
> Linux Server <=> Windows Server <=> Windows Clients (Indy used in the
> Windows server and client) the windows server app has a listener and
> the client app has a listener just as the windows server.
>
> When the connection goes down on the Linux Server I can recover
> gracefully on the windows server and reconnect without restarting the
> app. But when the windows server goes down I have to restart the app.
>
> > If you haven't I would suggest to wrap your connect/disconnect in a
> > try..finally clause
>
> True I have it in a try except but it only helps me detecting it but
> I cant recover from it except to inform the user to close the app and
> start it again, and they dont like that idea very much..
don't use a try..except. Use a try..finally. For example,
idTCPclient.Connect;
try
//do your stuff
finally
idTCPClient.Disconnect;
end;
this way you enforce your TCP client to disconnect itself, whether
there is an exception or not. It should help you prevent your problem
>
> Aaaaahhhh Windows!!!
<g>
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com