Skip to content

Commit

Permalink
Add check before sending a packet
Browse files Browse the repository at this point in the history
  • Loading branch information
nxrighthere authored Aug 22, 2018
1 parent bdb5709 commit 80156d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Managed/ENet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ public void ConfigureThrottle(uint interval, uint acceleration, uint deceleratio
}

public bool Send(byte channelID, Packet packet) {
CheckCreated();

return Native.enet_peer_send(nativePeer, channelID, packet.NativeData) >= 0;
}

Expand Down

0 comments on commit 80156d2

Please sign in to comment.