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

Fixed an issue where the NATCompleteServer example would crash on exit #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noblewhale
Copy link

Fixed an issue where the NATCompleteServer example would crash on exit due to trying to clean up samples that were never initialized.

…t due to trying to clean up samples that were never initialized.
@Luke1410
Copy link

Luke1410 commented Apr 2, 2018

Thanks for bringing this up. I could reproduce the crash when either the CloudServer or the RelayPlugin samples are not enabled. However, in my opinion the issue is rather that the relayPlugin pointer (in RelayPluginFramework) and the cloudServer pointer (in the CloudServerFramework) are not initialized to null in the respective ctors. In other words: Calling shutdown on uninitialized samples shouldn't crash.

So while your change prevents the crash as well, I think it's better to cleanly initialize the pointers and keep the calls to samples[i]->Shutdown(rakPeer) unconditionally.

As said, thanks once more for pointing out the issue. The corresponding change is available in the SLikeNet master Git repository already and is expected to be shipped with SLikeNet 0.2.0 (internal case number: SLNET-192).

Since in principle you pointed out the issue and suggested a fix, we'd like to offer you an entry in the acknowledgment section of the accompanying readme file (due to lack of other means to contact you, posting this in this comment here). The entry would look like this:

Please let me know if that's fine with you (preferably by mail to info@slikesoft.com - or alternatively leave a comment here). Unless you explicitly say so, we won't put that entry in the readme file (to respect your privacy).

@Luke1410
Copy link

Luke1410 commented May 8, 2018

Since we did an unplanned release of SLikeNet, we decided to incorporate this fix (aka: case SLNET-192) in SLikeNet 0.1.2 already which is available now on https://www.slikenet.com/ and on the GitHub project page: https://github.com/SLikeSoft/SLikeNet/releases/tag/v.0.1.2 .

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

Successfully merging this pull request may close these issues.

None yet

3 participants