Closed joshuameurey closed 1 week ago
checking
ok i can reproduce this with tanks demo, but not with benchmark.
in tanks demo: build = host, editor=client, client disconnects while moving.
only seems to happen sometimes, about 1/5 tests
never happens for regular kcp
checking where and when its set to null:
only seems to happen sometimes, about 1/5 tests
Yes, it happens for me too at about same rate.
here's what usually happens when it works
there are probably two issues here. 1) threadedkcp still spitting out data messages after disconnect 2) stopclient shouldn't call shutdown immediately, as already indicated here:
actually no, threadedtransport is fine. it spits out a few pending data messages, and then the disconnect message.
the problem is only this above
Describe the bug Application produces this error "Skipped Data message handling because connection is null." each time one client is disconnecting normally from the host.
[IMPORTANT] How can we reproduce the issue, step by step: Please tell us how to reproduce your issue, STEP BY STEP, with one of our built in examples. -> Configure project to use Threaded KCP transport -> Build and run a standalone application (this will be the host: client+server) -> Run application in Unity Editor (this is a pure client), connect to the host -> Disconnect properly the client (not in any bad/error conditions) -> Log error appears in Unity Log It appears that it remains data (bytes) in stack to process when the transport is disconnected
Any bug that can be reproduced, can be fixed. If we can't reproduce it, we can't fix.
Expected behavior Since the client is disconnected, no mater what is remaining in bytes data stack, it should not produce error.
Screenshots N/A
StackTrace
Skipped Data message handling because connection is null. UnityEngine.Debug:LogError (object) Mirror.NetworkClient:OnTransportData (System.ArraySegment1<byte>,int) (at Assets/Mirror/Core/NetworkClient.cs:395) Mirror.ThreadedTransport:ClientEarlyUpdate () (at Assets/Mirror/Transports/Threaded/ThreadedTransport.cs:410) Mirror.NetworkClient:NetworkEarlyUpdate () (at Assets/Mirror/Core/NetworkClient.cs:1489) Mirror.NetworkLoop:NetworkEarlyUpdate () (at Assets/Mirror/Core/NetworkLoop.cs:193)
Desktop (please complete the following information):
Additional context Important: this is produced using Threaded KCP transport