Skip to content

Commit

Permalink
fix rudp error: Client couldn't emit ("On.Modify") event before try c…
Browse files Browse the repository at this point in the history
…onnecting
  • Loading branch information
alec1o committed Nov 15, 2024
1 parent 6a79392 commit a4a1af2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rudp/partials/RUDP.ClientTo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public Task Open(Host host)
if (host == null) throw new NullReferenceException(nameof(host));

_socket = new Socket(host.AddressFamily, SocketType.Dgram, ProtocolType.Udp);

On.OnModify?.Invoke(null, _socket);

_socket.Connect(host.EndPoint);

InitConnection(ref host);
Expand Down

0 comments on commit a4a1af2

Please sign in to comment.