Open.NAT
Open.NAT copied to clipboard
Finalizer will not run in .Net Core builds, becareful and remember to manually call them.
Ever since .Net Core changed the behavior of finalizer, it will never release the ports on time. To be safe, users have to call NatDiscoverer.ReleaseSessionMappings(); manually to ensure it is properly released.
Sadly this break the last failover ditch effort some people may expect it to work. Of course there is still a workaround with this using: AppDomain.CurrentDomain.ProcessExit event. Only use this workaround on .Net Core builds if you want to ensure it release the session mappings if people click the X button.
Yes, you are right, thank you.
This is important now because I will upgrade the library to netstandard2.0 soon.