Skip to content

Commit f71c54c

Browse files
jbluepolarbearJeremy Anderson
andauthored
Fixed Unity iOS missing Manual Mode parameter in Unity iOS defines (#420)
Co-authored-by: Jeremy Anderson <jbluepolarbear@example.com>
1 parent 540cb65 commit f71c54c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

LiteNetLib/NetSocket.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class UnitySocketFix : MonoBehaviour
2525
internal int Port;
2626
internal bool Paused;
2727
internal NetSocket Socket;
28+
internal bool ManualMode;
2829

2930
private void Update()
3031
{
@@ -43,7 +44,7 @@ private void OnApplicationPause(bool pause)
4344
}
4445
else if (Paused)
4546
{
46-
if (!Socket.Bind(BindAddrIPv4, BindAddrIPv6, Port, Reuse, IPv6))
47+
if (!Socket.Bind(BindAddrIPv4, BindAddrIPv6, Port, Reuse, IPv6, ManualMode))
4748
{
4849
NetDebug.WriteError("[S] Cannot restore connection \"{0}\",\"{1}\" port {2}", BindAddrIPv4, BindAddrIPv6, Port);
4950
Socket.OnErrorRestore();
@@ -265,6 +266,7 @@ public bool Bind(IPAddress addressIPv4, IPAddress addressIPv6, int port, bool re
265266
_unitySocketFix.Reuse = reuseAddress;
266267
_unitySocketFix.Port = LocalPort;
267268
_unitySocketFix.IPv6 = ipv6Mode;
269+
_unitySocketFix.ManualMode = manualMode;
268270
}
269271
else
270272
{

0 commit comments

Comments
 (0)