1
0
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:
Pavel Djundik
2015-10-19 21:43:07 +03:00
parent d42aae5046
commit f41e4b551c
2 changed files with 2 additions and 20 deletions
+2 -3
View File
@@ -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
{