mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-05-18 13:53:35 +02:00
Reset buffer/challenge when disconnecting
This commit is contained in:
@@ -128,8 +128,6 @@
|
|||||||
public function Connect( $Ip, $Port, $Timeout = 3, $Engine = self :: SOURCE )
|
public function Connect( $Ip, $Port, $Timeout = 3, $Engine = self :: SOURCE )
|
||||||
{
|
{
|
||||||
$this->Disconnect( );
|
$this->Disconnect( );
|
||||||
$this->Buffer->Reset( );
|
|
||||||
$this->Challenge = 0;
|
|
||||||
|
|
||||||
if( !is_int( $Timeout ) || $Timeout < 0 )
|
if( !is_int( $Timeout ) || $Timeout < 0 )
|
||||||
{
|
{
|
||||||
@@ -166,6 +164,9 @@
|
|||||||
public function Disconnect( )
|
public function Disconnect( )
|
||||||
{
|
{
|
||||||
$this->Connected = false;
|
$this->Connected = false;
|
||||||
|
$this->Challenge = 0;
|
||||||
|
|
||||||
|
$this->Buffer->Reset( );
|
||||||
|
|
||||||
$this->Socket->Close( );
|
$this->Socket->Close( );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user