libfreerdp-core/transport: prevent further read/write when socket is dropped.
This commit is contained in:
parent
258db78efb
commit
7b23ed6f97
@ -262,6 +262,12 @@ int transport_write(rdpTransport* transport, STREAM* s)
|
|||||||
stream_seek(s, status);
|
stream_seek(s, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status < 0)
|
||||||
|
{
|
||||||
|
/* A write error indicates that the peer has dropped the connection */
|
||||||
|
transport->layer = TRANSPORT_LAYER_CLOSED;
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TRANSPORT_LAYER_TCP,
|
TRANSPORT_LAYER_TCP,
|
||||||
TRANSPORT_LAYER_TLS
|
TRANSPORT_LAYER_TLS,
|
||||||
|
TRANSPORT_LAYER_CLOSED
|
||||||
} TRANSPORT_LAYER;
|
} TRANSPORT_LAYER;
|
||||||
|
|
||||||
typedef struct rdp_transport rdpTransport;
|
typedef struct rdp_transport rdpTransport;
|
||||||
|
Loading…
Reference in New Issue
Block a user