From 03357f42755ca6c73b2e5595ec60b48ce376bffa Mon Sep 17 00:00:00 2001 From: mischa Date: Tue, 29 Oct 2024 08:54:19 +0100 Subject: [PATCH] fix: #3876 KcpTransport OnClientError null handling during shutdown --- Assets/Mirror/Transports/KCP/KcpTransport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Transports/KCP/KcpTransport.cs b/Assets/Mirror/Transports/KCP/KcpTransport.cs index 2be24af8a..b72e14835 100644 --- a/Assets/Mirror/Transports/KCP/KcpTransport.cs +++ b/Assets/Mirror/Transports/KCP/KcpTransport.cs @@ -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 );