Network/TcpClient: Fix Send hanging when used in non-blocking mode

This commit is contained in:
Lynix 2017-06-20 06:57:35 +02:00
parent 5fe782bd46
commit dc28a9161b
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ namespace Nz
}); });
} }
while (totalByteSent < size) while (totalByteSent < size || !IsBlockingEnabled())
{ {
int sendSize = static_cast<int>(std::min<std::size_t>(size - totalByteSent, std::numeric_limits<int>::max())); //< Handle very large send int sendSize = static_cast<int>(std::min<std::size_t>(size - totalByteSent, std::numeric_limits<int>::max())); //< Handle very large send
int sentSize; int sentSize;