From c4ee7d0bb4ba4e96bf3130da95b5c9d54ab5c14b Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Tue, 7 Aug 2012 12:58:25 -0400 Subject: [PATCH] FDisconnect --- mdl/m_socket_class.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mdl/m_socket_class.pas b/mdl/m_socket_class.pas index ea7dc19..2f5276a 100644 --- a/mdl/m_socket_class.pas +++ b/mdl/m_socket_class.pas @@ -49,6 +49,7 @@ Type FTelnetSubData : String; FTelnetClient : Boolean; FTelnetServer : Boolean; + FDisconnect : Boolean; Constructor Create; Destructor Destroy; Override; @@ -73,7 +74,7 @@ Type Function WaitConnection : TSocketClass; Procedure PurgeInputData; Procedure PurgeOutputData; - Function PeekChar (Num: Byte) : Char; + Function PeekChar (Num: Byte) : Char; Function ReadChar : Char; Function WriteChar (Ch: Char) : LongInt; Procedure Status (Str: String); @@ -122,7 +123,7 @@ Begin FTelnetEcho := False; FTelnetClient := False; FTelnetServer := False; -{ FHostIP := '127.0.0.1';} + FDisconnect := True; FHostIP := ''; StatusUpdated := False; @@ -131,7 +132,7 @@ End; Destructor TSocketClass.Destroy; Begin - Disconnect; + If FDisconnect Then Disconnect; SocketStatus.Free;