Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

'NetworkConnection' does not contain a definition for 'Dispose' #15

Open
jjantschulev opened this issue Nov 30, 2019 · 2 comments
Open

Comments

@jjantschulev
Copy link

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.

@robinnorth
Copy link

Mirror recently changed NetworkConnection to no longer implement the IDisposable interface and instead just clean up directly on disconnection (see MirrorNetworking/Mirror#1179), so LiteNetLib4MirrorNetworkManager should just need to call conn.Disconnect(); now.

@robinnorth
Copy link

robinnorth commented Jan 23, 2020

This Mirror change was reverted recently (see MirrorNetworking/Mirror@4cc4279), 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants