Skip to content

Commit

Permalink
Fix Linux Send Complete Status (#4538)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Sep 9, 2024
1 parent 1554d42 commit 8ee995e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -2315,7 +2315,8 @@ SocketSend(
//
// Go ahead and try to send on the socket.
//
if (CxPlatSendDataSend(SendData) == QUIC_STATUS_PENDING) {
QUIC_STATUS Status = CxPlatSendDataSend(SendData);
if (Status == QUIC_STATUS_PENDING) {
//
// Couldn't send right now, so queue up the send and wait for send
// (EPOLLOUT) to be ready.
Expand All @@ -2329,7 +2330,7 @@ SocketSend(
SocketContext->Binding->Datapath->TcpHandlers.SendComplete(
SocketContext->Binding,
SocketContext->Binding->ClientContext,
errno,
Status,
SendData->TotalSize);
}
CxPlatSendDataFree(SendData);
Expand Down Expand Up @@ -2626,7 +2627,8 @@ CxPlatSocketContextFlushTxQueue(
CxPlatLockRelease(&SocketContext->TxQueueLock);

while (SendData != NULL) {
if (CxPlatSendDataSend(SendData) == QUIC_STATUS_PENDING) {
QUIC_STATUS Status = CxPlatSendDataSend(SendData);
if (Status == QUIC_STATUS_PENDING) {
if (!SendAlreadyPending) {
//
// Add the EPOLLOUT event since we have more pending sends.
Expand All @@ -2642,7 +2644,7 @@ CxPlatSocketContextFlushTxQueue(
SocketContext->Binding->Datapath->TcpHandlers.SendComplete(
SocketContext->Binding,
SocketContext->Binding->ClientContext,
errno,
Status,
SendData->TotalSize);
}
CxPlatSendDataFree(SendData);
Expand Down

0 comments on commit 8ee995e

Please sign in to comment.