1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-06-28 04:53:15 +02:00

Only write SERVERDATA_RESPONSE_VALUE once for multi packet responses

This fixes the bug where all RCON queries on same SourceQuery object would return empty responses
This commit is contained in:
Byte
2017-12-27 03:23:43 +11:00
committed by GitHub
parent 95057e9c35
commit ee60bef189
+2 -2
View File
@@ -145,11 +145,11 @@
// We do this stupid hack to handle split packets // We do this stupid hack to handle split packets
// See https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Multiple-packet_Responses // See https://developer.valvesoftware.com/wiki/Source_RCON_Protocol#Multiple-packet_Responses
if( StrLen( $Data ) >= 4000 ) if( StrLen( $Data ) >= 4000 )
{
do
{ {
$this->Write( SourceQuery::SERVERDATA_RESPONSE_VALUE ); $this->Write( SourceQuery::SERVERDATA_RESPONSE_VALUE );
do
{
$Buffer = $this->Read( ); $Buffer = $this->Read( );
$Buffer->GetLong( ); // RequestID $Buffer->GetLong( ); // RequestID