Skip to content

Commit

Permalink
fix: #3876 KcpTransport OnClientError null handling during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mischa committed Oct 29, 2024
1 parent c80a3c8 commit 03357f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Mirror/Transports/KCP/KcpTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected virtual void Awake()
() => OnClientConnected.Invoke(),
(message, channel) => OnClientDataReceived.Invoke(message, FromKcpChannel(channel)),
() => OnClientDisconnected?.Invoke(), // may be null in StopHost(): https://github.com/MirrorNetworking/Mirror/issues/3708
(error, reason) => OnClientError.Invoke(ToTransportError(error), reason),
(error, reason) => OnClientError?.Invoke(ToTransportError(error), reason), // may be null during shutdown: https://github.com/MirrorNetworking/Mirror/issues/3876
config
);

Expand Down

0 comments on commit 03357f4

Please sign in to comment.