 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
V.Valev Guest
|
Posted: Thu Jan 12, 2006 2:44 pm Post subject: Strange delay on TSocketConnection disconnect |
|
|
Hi all,
I'm using TSocketConnection to connect to a Remote Data Module (Delphi 7).
Everything works fine, but on some machines there's a 3 minutes dalay when
disconnecting the socket connection (SocketConnection.Connected := False).
After tracing the problem in SConnect.pas, I found that the delay is at the
TStreamedConnection.InternalClose method:
WaitForSingleObject(FTransport.Handle, 180000);
For any reason, the Transport thread is not terminated, so
WaitForSingleObject timeout's. The machines that this occures are with
Windows XP SP2. But there are machines with same configuration that the
problem doesn't persist.
I've searched the net for that problem, but with no result. I found that
similar behaviour could be resulted if the thread is suspended when
Terminated is called or if the thread synchronizes to the main VCL thread.
In my case none of this happens (as far as I traced into the borland's
code).
I've temporarly decided the problem by changing the timeout to 3 seconds.
Would that be a problem?
Anyone seen this problem? Any suggestions?
Thanks in advance.
|
|
| Back to top |
|
 |
Wayne Guest
|
Posted: Fri Jan 13, 2006 1:40 pm Post subject: Re: Strange delay on TSocketConnection disconnect |
|
|
I have had the same problem, but it is not a consistent problem. Some times
it disconnects OK and sometimes it will wait the 3 minutes. I have not been
able to determine what causes it. Like you, I was hesitant to change the
timeout.
Wayne
"V.Valev" <val.valev (AT) abv (DOT) bg> wrote
| Quote: | Hi all,
I'm using TSocketConnection to connect to a Remote Data Module (Delphi 7).
Everything works fine, but on some machines there's a 3 minutes dalay when
disconnecting the socket connection (SocketConnection.Connected := False).
After tracing the problem in SConnect.pas, I found that the delay is at
the
TStreamedConnection.InternalClose method:
WaitForSingleObject(FTransport.Handle, 180000);
For any reason, the Transport thread is not terminated, so
WaitForSingleObject timeout's. The machines that this occures are with
Windows XP SP2. But there are machines with same configuration that the
problem doesn't persist.
I've searched the net for that problem, but with no result. I found that
similar behaviour could be resulted if the thread is suspended when
Terminated is called or if the thread synchronizes to the main VCL thread.
In my case none of this happens (as far as I traced into the borland's
code).
I've temporarly decided the problem by changing the timeout to 3 seconds.
Would that be a problem?
Anyone seen this problem? Any suggestions?
Thanks in advance.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|