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: | 21 Aug 2006 07:08:04 |
Gerhard Venter wrote:
> If the server drops the connection to a client for some reason I am
> able to trap it but there is just no way I can try and reconnect (or
> reset) )the client again without closing the application first.
i'm not an expert but this has something to do with the way Windows
handles the sockets. AFAIK there is no realistic way for you to know if
a connection has been lost or closed unless you use timeouts or try to
connect/disconnect.
If you haven't I would suggest to wrap your connect/disconnect in a
try..finally clause
>The
> moment you touch either the Connect, Disconnect or Connected property
> it raises the 10054 exception.
which is what happens when the remote host is stopped, rebooted,
disabled or it uses a hard close.
>
> Indy 10 Version 10.0.52
not that it will solve your problem but I would suggest to update to
the latest version. You can download it from
http://www.indyproject.org/Sockets/Download/DevSnapshot.en.html
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com