Skip to content

Commit 5b39d65

Browse files
authored
Merge pull request xPaw#124 from InvexByte/master
Fix #43 - Only write SERVERDATA_RESPONSE_VALUE once for multi packet responses
2 parents 95057e9 + ee60bef commit 5b39d65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SourceQuery/SourceRcon.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ public function Command( $Command )
146146
// See https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Multiple-packet_Responses
147147
if( StrLen( $Data ) >= 4000 )
148148
{
149+
$this->Write( SourceQuery::SERVERDATA_RESPONSE_VALUE );
150+
149151
do
150-
{
151-
$this->Write( SourceQuery::SERVERDATA_RESPONSE_VALUE );
152-
152+
{
153153
$Buffer = $this->Read( );
154154

155155
$Buffer->GetLong( ); // RequestID

0 commit comments

Comments
 (0)