RE: What to do in OnDisconnect?
From: "Philippe Roger" <philippe@xxxxxxxxxxxxx>
Date: Thu, 17 Jan 2008 04:01:57 +0100 (CET)
> 
> Hi Jakob,
> 
> As I said, I must be missing something obvious...
> 
> 
> My actual problem is that my application seems to be caught in a recursive
> loop, which allocates more memory at every pass, when I am trying to
> reconnect following a TCP connection failure, probably due to a faulty
> implementation of my application...
> 
> Thanks,
> Philippe
> 

That was indeed my own problem, due to mishandling the reading of the
socket, via client->recv() (the socket had become an invalid socket
following the TCP connection failure).  Having fixed that, I can now simply
reestablish the connection, by calling client->connect(false)

Thanks again,
Philippe