diff --git a/rdp/rdp_tcp.c b/rdp/rdp_tcp.c index 0283ba1d..31ee0008 100644 --- a/rdp/rdp_tcp.c +++ b/rdp/rdp_tcp.c @@ -72,7 +72,7 @@ rdp_tcp_recv(struct rdp_tcp* self, struct stream* s, int len) { if (g_tcp_last_error_would_block(self->sck)) { - g_sleep(1); + g_tcp_can_recv(self->sck, 10); } else { @@ -121,7 +121,7 @@ rdp_tcp_send(struct rdp_tcp* self, struct stream* s) { if (g_tcp_last_error_would_block(self->sck)) { - g_sleep(1); + g_tcp_can_send(self->sck, 10); } else {