Re: TIdHTTP's Get-method locks ?

Giganews Newsgroups
Subject: Re: TIdHTTP's Get-method locks ?
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Tue, 21 Aug 2007

<…@tas.de> wrote in message news:711A537E7532E340…@tas.de...

> after some hours this camera stops responding. The get method,
> which is embedded in a try...catch block, starts now throwing the
> exception "Read timeout" when trying to fetch data from the camera.

That is to be expected if the camera is not responding.

> The next call of get seems to crash my TThread completely,
> although the exception should be catched.

It will be.

> My first thought was that the get-method blocks my thread

It does.

> that can't be the case, because each get is guarded by a
> second TThread which disconnects the TIdHTTP instance
> after a specific time.

TIdHTTP has its own ReadTimeout property for that.

>    catch(EIdHTTPProtocolException &e){

You should always catch exceptions by 'const' reference instead, ie:

    catch(const EIdHTTPProtocolException &e)

Gambit

Replies

In response to

TIdHTTP's Get-method locks ? posted by …@tas.de on Tue, 21 Aug 2007