Permalink
Browse files

Intentional leak to avoid an occasional crasher.

  • Loading branch information...
1 parent d7584a4 commit 89aec240581567588a6c78e8e09f7db02eccaee3 Danny Greg committed Apr 19, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 Play Client/PLAController.m
@@ -87,10 +87,12 @@ - (void)setUpPusher{
[channel removeBinding:updateNowPlayingPusherChannelBinding];
self.updateNowPlayingPusherChannelBinding = nil;
- [pusherClient setDelegate:nil];
- [pusherClient unsubscribeFromChannel:channel];
- [pusherClient setReconnectAutomatically:NO];
- [pusherClient disconnect];
+ [self.pusherClient setDelegate:nil];
+ [self.pusherClient unsubscribeFromChannel:channel];
+ [self.pusherClient setReconnectAutomatically:NO];
+ [self.pusherClient disconnect];
+ [self.pusherClient retain]; //intentional leak. For some when these object die they occasionally wreak havoc with a hard-as-shit crash.
+ self.pusherClient = nil;
}
self.pusherClient = [PTPusher pusherWithKey:pusherKey delegate:self encrypted:NO];

0 comments on commit 89aec24

Please sign in to comment.