mirror of
https://github.com/sheumann/VNCviewGS.git
synced 2024-11-29 02:49:40 +00:00
Avoid long hangs on disconnect if the connection is disrupted.
This commit is contained in:
parent
5c1fc77f9b
commit
e15038f3ec
@ -670,10 +670,15 @@ void UnTuneMarinetti (void) {
|
|||||||
* CloseTCPConnection() - Close the TCP connection to the host
|
* CloseTCPConnection() - Close the TCP connection to the host
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
void CloseTCPConnection (void) {
|
void CloseTCPConnection (void) {
|
||||||
|
long stopTime;
|
||||||
|
|
||||||
TCPIPCloseTCP(hostIpid);
|
TCPIPCloseTCP(hostIpid);
|
||||||
WaitCursor();
|
WaitCursor();
|
||||||
DisplayConnectStatus("\pClosing VNC session...", FALSE);
|
DisplayConnectStatus("\pClosing VNC session...", FALSE);
|
||||||
|
stopTime = TickCount() + 5 * 60;
|
||||||
do {
|
do {
|
||||||
|
if (TickCount() >= stopTime)
|
||||||
|
TCPIPAbortTCP(hostIpid);
|
||||||
TCPIPPoll();
|
TCPIPPoll();
|
||||||
TCPIPLogout(hostIpid);
|
TCPIPLogout(hostIpid);
|
||||||
} while (toolerror() == terrSOCKETOPEN);
|
} while (toolerror() == terrSOCKETOPEN);
|
||||||
|
Loading…
Reference in New Issue
Block a user