mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
transport: check if layer was set to closed
There are several code paths and error conditions where transport->layer is correctly set to TRANSPORT_LAYER_CLOSED but the required code for checking that state was missing. E.g. write errors in the rdg code resulted in marking the transport layer as closed but the transport code would indefinitely continue to read from the receiving socket.
This commit is contained in:
@@ -1005,6 +1005,12 @@ int transport_check_fds(rdpTransport* transport)
|
||||
if (!transport)
|
||||
return -1;
|
||||
|
||||
if (transport->layer == TRANSPORT_LAYER_CLOSED)
|
||||
{
|
||||
WLog_Print(transport->log, WLOG_DEBUG, "transport_check_fds: transport layer closed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
dueDate = now + transport->settings->MaxTimeInCheckLoop;
|
||||
|
||||
if (transport->haveMoreBytesToRead)
|
||||
|
||||
Reference in New Issue
Block a user