Skip to content

Commit 7dd6989

Browse files
committed
Fixing bug in GCDAsyncUdpSocket
1 parent 310058e commit 7dd6989

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

GCD/GCDAsyncUdpSocket.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4087,14 +4087,13 @@ - (void)doReceive
40874087

40884088
if (waitingForSocket)
40894089
{
4090-
// Not enough room in the underlying OS socket send buffer.
4091-
// Wait for a notification.
4090+
// Wait for a notification of available data.
40924091

4093-
if (!(flags & kSock4CanAcceptBytes)) {
4094-
[self resumeSend4Source];
4092+
if (socket4FDBytesAvailable == 0) {
4093+
[self resumeReceive4Source];
40954094
}
4096-
if (!(flags & kSock6CanAcceptBytes)) {
4097-
[self resumeSend6Source];
4095+
if (socket6FDBytesAvailable == 0) {
4096+
[self resumeReceive6Source];
40984097
}
40994098
}
41004099
else if (error)

0 commit comments

Comments
 (0)