Skip to content

Commit c2c0b6b

Browse files
committed
Reset buffer/challenge when disconnecting
1 parent b6cb74d commit c2c0b6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SourceQuery/SourceQuery.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ public function __destruct( )
128128
public function Connect( $Ip, $Port, $Timeout = 3, $Engine = self :: SOURCE )
129129
{
130130
$this->Disconnect( );
131-
$this->Buffer->Reset( );
132-
$this->Challenge = 0;
133131

134132
if( !is_int( $Timeout ) || $Timeout < 0 )
135133
{
@@ -166,6 +164,9 @@ public function Connect( $Ip, $Port, $Timeout = 3, $Engine = self :: SOURCE )
166164
public function Disconnect( )
167165
{
168166
$this->Connected = false;
167+
$this->Challenge = 0;
168+
169+
$this->Buffer->Reset( );
169170

170171
$this->Socket->Close( );
171172

0 commit comments

Comments
 (0)