mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-05-18 13:53:35 +02:00
Throw an exception when nothing was read from socket
This commit is contained in:
@@ -82,15 +82,14 @@
|
||||
|
||||
if( $Buffer->Remaining( ) === 0 )
|
||||
{
|
||||
// TODO: Should we throw an exception here?
|
||||
return;
|
||||
throw new InvalidPacketException( 'Failed to read any data from socket', InvalidPacketException::BUFFER_EMPTY );
|
||||
}
|
||||
|
||||
$Header = $Buffer->GetLong( );
|
||||
|
||||
if( $Header === -1 ) // Single packet
|
||||
{
|
||||
// We don't have to do anything
|
||||
// We don't have to do anything
|
||||
}
|
||||
else if( $Header === -2 ) // Split packet
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user