8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 00:03:03 +01:00

Backported fix for CORE-4788: Superclassic server hangs when receiving network packet

This commit is contained in:
alexpeshkoff 2015-05-12 12:17:47 +00:00
parent 9566363732
commit 7c15e5bafc

View File

@ -3124,6 +3124,13 @@ static bool packet_receive(rem_port* port, UCHAR* buffer, SSHORT buffer_length,
const timeval savetime = timeout;
const SOCKET ph = port->port_handle;
if (ph == INVALID_SOCKET)
{
if (!(port->port_flags & PORT_disconnect)) {
inet_error(port, "invalid socket in packet_receive", isc_net_read_err, EINVAL);
}
return false;
}
// Unsed to send a dummy packet, but too big to be defined in the loop.
PACKET packet;