Skip to content

Commit 77066bf

Browse files
committed
Revert "Merge branch 'develop' into fix/wrong-size-passed-to-unsafe-memset"
This reverts commit 65b089b, reversing changes made to 9b58fe3.
1 parent 65b089b commit 77066bf

File tree

5 files changed

+8
-21
lines changed

5 files changed

+8
-21
lines changed

com.unity.netcode.adapter.utp/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ All notable changes to this package will be documented in this file. The format
1010
### Fixed
1111

1212
- Fixed packet overflow errors when sending payloads too close to the MTU (was mostly visible when using Relay).
13-
- Don't throw an exception when the host disconnects (issue 1439 on GitHub).
1413

1514
## [1.0.0-pre.3] - 2021-10-22
1615

com.unity.netcode.adapter.utp/Runtime/UnityTransport.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -435,22 +435,20 @@ private bool ProcessEvent()
435435
}
436436
case TransportNetworkEvent.Type.Disconnect:
437437
{
438+
InvokeOnTransportEvent(NetcodeNetworkEvent.Disconnect,
439+
ParseClientId(networkConnection),
440+
default(ArraySegment<byte>),
441+
Time.realtimeSinceStartup);
442+
438443
if (m_ServerConnection.IsCreated)
439444
{
440445
m_ServerConnection = default;
441-
442-
var reason = reader.ReadByte();
443-
if (reason == (byte)Networking.Transport.Error.DisconnectReason.MaxConnectionAttempts)
446+
if (m_Driver.GetConnectionState(m_ServerConnection) == NetworkConnection.State.Connecting)
444447
{
445448
Debug.LogError("Client failed to connect to server");
446449
}
447450
}
448451

449-
InvokeOnTransportEvent(NetcodeNetworkEvent.Disconnect,
450-
ParseClientId(networkConnection),
451-
default(ArraySegment<byte>),
452-
Time.realtimeSinceStartup);
453-
454452
m_State = State.Disconnected;
455453
return true;
456454
}

com.unity.netcode.adapter.utp/Tests/Runtime/Helpers/RuntimeTestsHelpers.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ public static class RuntimeTestsHelpers
1010
{
1111
// Half a second might seem like a very long time to wait for a network event, but in CI
1212
// many of the machines are underpowered (e.g. old Android devices or Macs) and there are
13-
// sometimes very high lag spikes. PS4 and Switch are particularly sensitive in this regard
14-
// so we allow even more time for these platforms.
15-
#if UNITY_PS4 || UNITY_SWITCH
16-
public const float MaxNetworkEventWaitTime = 2.0f;
17-
#else
13+
// sometimes lag spikes that cause can cause delays upwards of 300ms.
1814
public const float MaxNetworkEventWaitTime = 0.5f;
19-
#endif
2015

2116
// Wait for an event to appear in the given event list (must be the very next event).
2217
public static IEnumerator WaitForNetworkEvent(NetworkEvent type, List<TransportEvent> events)

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Additional documentation and release notes are available at [Multiplayer Documen
2424
- Fixed a runtime error when sending an array of an INetworkSerializable type that's implemented as a struct (#1402)
2525
- NetworkConfig will no longer throw an OverflowException in GetConfig() when ForceSamePrefabs is enabled and the number of prefabs causes the config blob size to exceed 1300 bytes. (#1385)
2626
- Fixed NetworkVariable not calling NetworkSerialize on INetworkSerializable types (#1383)
27-
- Fixed NullReferenceException on ImportReferences call in NetworkBehaviourILPP (#1434)
2827

2928
- Fixed NetworkObjects not being despawned before they are destroyed during shutdown for client, host, and server instances. (#1390)
3029
- Fixed client player object being destroyed on server when the client's player object has DontDestroyWithOwner set. (#1433)

com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,7 @@ private bool ImportReferences(ModuleDefinition moduleDefinition)
312312
assemblies.Add(m_MainModule.Assembly);
313313
foreach (var reference in m_MainModule.AssemblyReferences)
314314
{
315-
var assembly = m_AssemblyResolver.Resolve(reference);
316-
if (assembly != null)
317-
{
318-
assemblies.Add(assembly);
319-
}
315+
assemblies.Add(m_AssemblyResolver.Resolve(reference));
320316
}
321317

322318
var extensionConstructor =

0 commit comments

Comments
 (0)