Skip to content

Commit 2392390

Browse files
important
1 parent 551e48e commit 2392390

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Infinity.Udp/UdpConnectionListener.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private async Task StartListeningForData()
113113
reader.Length = result.ReceivedBytes;
114114
reader.Position = 0;
115115

116-
await ReadCallback(reader);
116+
await ReadCallback(reader, remoteEP);
117117
}
118118
catch (SocketException sx)
119119
{
@@ -133,9 +133,8 @@ private async Task StartListeningForData()
133133
}
134134
}
135135

136-
private async Task ReadCallback(MessageReader reader)
136+
private async Task ReadCallback(MessageReader reader, EndPoint remote_end_point)
137137
{
138-
EndPoint remote_end_point = new IPEndPoint(EndPoint.Address, EndPoint.Port);
139138

140139
// I'm a little concerned about a infinite loop here, but it seems like it's possible
141140
// to get 0 bytes read on UDP without the socket being shut down.

0 commit comments

Comments
 (0)