Created
December 3, 2015 06:09
-
-
Save joshmarinacci/f3075f4101eddc6b7393 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnStop() | |
{ | |
try | |
{ | |
eventLog.WriteEntry("Unsubscribe channel " + channel); | |
mrePubNub = new ManualResetEvent(false); | |
pubnub.Unsubscribe<string>(channel, UnsubscribeCallback, SubscribeMethodForConnectCallback, UnsubscribeMethodForDisconnectCallback, ErrorCallback); | |
mrePubNub.WaitOne(manualResetEventsWaitTimeout); | |
eventLog.WriteEntry("Channel " + channel + " unsubscribed."); | |
finalizeService = true; | |
} | |
catch (Exception erro) | |
{ | |
eventLog.WriteEntry("Unsubscribe channel " + channel + "\r\n" + erro.Message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment