Re: IdMappedPort and Indy10

Giganews Newsgroups
Subject: Re: IdMappedPort and Indy10
Posted by:  dumb (sitemast…
Date: Tue, 2 Mar 2004

Works if you comment following line of code:

TIdIOHandlerSocket(FOutboundClient.IOHandler).ConnectTimeout :=

but then I have no idea how to set up outbound connection timeout value. The
default value will be -1, and I'm not sure how much it is...

"Mattias Fagerlund" <> wrote in message
> Hi!
> I've been trying to get to grips with Indy10, and though I have a lot yet
> learn, I thought I'd point out these bugs I found. I'm using the latest
> version of Indy10 from I'll try to be as specific
> possible, so that the bugs can be tracked down easily -  I hope I don't
> report any "bugs" that are actually mistakes on my part, but that's always
> risk...
> When opening a mapped port connection, an exception is raised on this
> (line 366, IdMappedPortTCP.pas)
>      TIdIOHandlerSocket(FOutboundClient.IOHandler).ConnectTimeout :=
> FConnectTimeOut;
> because IOHandler is nil at that time.
> Adding the lines
>      if not Assigned(FOutboundClient.IOHandler) then
>        FOutboundClient.CreateIOHandler(nil);
> right before the offending line removes the problem.
> The next issue is that "FConnectTimeOut" (TIdMappedPortContext) defaults
> IdTimeoutDefault (-1) - but that's not an acceptable value, which leads to
> another exception.
> So I hard coded that to 2000 to continue my testing - I wasn't sure what
> value was supposed to be.
> Now things run, but if I stop the server after having served data through
> it, it crashes with an undetermined AV.
> Lastly, if I hook up a thread pool and start the server, it crashes when I
> stop it even if I don't serve any data through it. I'm including my test
> program that demonstrates the issues  reported. You will need to alter
> IdMappedPortTCP as specified to make it run at all.
> with regards,
> mattias



In response to

IdMappedPort and Indy10 posted by Mattias Fagerlund on Mon, 1 Mar 2004