LiteNetLib4Mirror
LiteNetLib4Mirror copied to clipboard
'NetworkConnection' does not contain a definition for 'Dispose'
The Exact Error Message is:
Assets/Mirror/Runtime/Transport/LiteNetLib4Mirror/LiteNetLib4MirrorNetworkManager.cs(139,18): error CS1061: 'NetworkConnection' does not contain a definition for 'Dispose' and no accessible extension method 'Dispose' accepting a first argument of type 'NetworkConnection' could be found (are you missing a using directive or an assembly reference?)
I just imported the latest version of LiteNetLib4Mirror (1.2.8). I also imported the latest version of Mirror(5.0.2).
For the moment I have removed this line, and everything seems to work, but i dont know if that might lead to a memory leak or other unintended side effect.
Mirror recently changed NetworkConnection
to no longer implement the IDisposable
interface and instead just clean up directly on disconnection (see https://github.com/vis2k/Mirror/pull/1179), so LiteNetLib4MirrorNetworkManager
should just need to call conn.Disconnect();
now.
This Mirror change was reverted recently (see https://github.com/vis2k/Mirror/commit/4cc4279d7ddeaf61fe300b3dc420143e63942f1f), so this issue can be closed once the transport is updated to work with the latest Mirror release (7.2.1 at the time of writing). I have made a PR for that: #16