Minor fixes

This commit is contained in:
Jérôme Leclercq
2021-06-04 18:02:28 +02:00
parent 8fe11711a3
commit 4b3b595a99
15 changed files with 47 additions and 36 deletions

View File

@@ -361,8 +361,9 @@ namespace Nz
NazaraAssert(m_handle != SocketImpl::InvalidHandle, "Invalid handle");
NazaraAssert(buffer && size > 0, "Invalid buffer");
CallOnExit updateSent;
std::size_t totalByteSent = 0;
CallOnExit updateSent;
if (sent)
{
updateSent.Reset([sent, &totalByteSent] ()

View File

@@ -110,7 +110,7 @@ namespace Nz
{
NazaraAssert(handle != InvalidHandle, "Invalid handle");
if (GetLastError(handle, nullptr) != SocketError::Internal)
if (GetLastError(handle, nullptr) == SocketError::Internal)
NazaraWarning("Failed to clear socket error code: " + Error::GetLastSystemError(WSAGetLastError()));
}