diff options
Diffstat (limited to 'core/io/stream_peer_tcp.cpp')
-rw-r--r-- | core/io/stream_peer_tcp.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index bcdae343b8..a8dd263484 100644 --- a/core/io/stream_peer_tcp.cpp +++ b/core/io/stream_peer_tcp.cpp @@ -217,6 +217,11 @@ Error StreamPeerTCP::read(uint8_t *p_buffer, int p_bytes, int &r_received, bool to_read -= read; total_read += read; + + if (!p_block) { + r_received = total_read; + return OK; + } } } |