From dc247c556df53664aa1ce6ff8f947f539d97a393 Mon Sep 17 00:00:00 2001 From: Fred Nicolson Date: Mon, 19 Nov 2018 17:01:57 +0000 Subject: [PATCH] Fix fr::Socket receive_all bug Introduced with disconnect tweaking a few days ago. --- src/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Socket.cpp b/src/Socket.cpp index 79c01c3..491615f 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -49,7 +49,7 @@ namespace fr size_t received = 0; auto *arr = (char*)dest; Status status = receive_raw(&arr[bytes_read], (size_t)bytes_remaining, received); - if(status == fr::Socket::Disconnected) + if(status != fr::Socket::WouldBlock && status != fr::Socket::Success) return status; bytes_remaining -= received; bytes_read += received;