1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Fixed infinite loop bug... Check if OnSendOK needs to be sent

This commit is contained in:
Bryan Roe
2019-06-24 17:23:32 -07:00
parent fc8fba9f62
commit e2bcd832b5

View File

@@ -1920,7 +1920,17 @@ void ILibAsyncSocket_PostSelect(void* socketModule, int slct, fd_set *readset, f
TRY_TO_SEND = 0;
}
}
else
{
// All data was sent
BIO_reset(module->writeBio);
module->TotalBytesSent += bytesSent;
module->PendingBytesToSend = (unsigned int)(module->writeBioBuffer->length);
if (module->PendingSend_Head->buffer != NULL && module->PendingSend_Head->UserFree == ILibAsyncSocket_MemoryOwnership_CHAIN) { free(module->PendingSend_Head->buffer); }
free(module->PendingSend_Head);
module->PendingSend_Head = module->PendingSend_Tail = NULL;
TRY_TO_SEND = 0;
}
}
else
#endif