Re: Handle a ClosedGracefully

Giganews Newsgroups
Subject: Re: Handle a ClosedGracefully
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Mon, 8 Oct 2007

"RonaldoC" <ronald…@cybernet.com.br> wrote in message
news:7A4226CA7B38E340ronald…@cybernet.com.br...

> After I execute an IdHttp.POST and everything works
> well, at the next POST I receive a ClosedGracefully event
> message at my exception.

The only way I can think of that happening is if the server (or an
intermediate router) is closing the connection after sending the first
response, but the response headers indicate that the connection was going to
be kept alive on the server side, so TIdHTTP would not close its end of the
connection right away.  On the next Post(), it would then try to access an
invalid connection and fail.  Try fully disconnecting the connection and
attempt the request again.

Gambit

Replies

None

In response to

Handle a ClosedGracefully posted by RonaldoC on Mon, 8 Oct 2007