Permalink
Browse files

Revert "Cache channel authentication data."

This reverts commit 1b92f78.
  • Loading branch information...
1 parent 1b92f78 commit 5bd0c5a91c2f085a4ff543a0aee347acc5ba51fd @lukeredpath lukeredpath committed Jun 4, 2012
Showing with 1 addition and 11 deletions.
  1. +1 −11 Library/PTPusherChannel.m
@@ -171,9 +171,7 @@ - (void)markAsUnsubscribed
#pragma mark -
-@implementation PTPusherPrivateChannel {
- NSDictionary *_cachedAuthData;
-}
+@implementation PTPusherPrivateChannel
- (void)handleSubscribeEvent:(PTPusherEvent *)event
{
@@ -195,18 +193,10 @@ - (BOOL)isPrivate
- (void)authorizeWithCompletionHandler:(void(^)(BOOL, NSDictionary *, NSError *))completionHandler
{
- if (_cachedAuthData) {
- return completionHandler(YES, _cachedAuthData, nil);
- }
-
PTPusherChannelAuthorizationOperation *authOperation = [PTPusherChannelAuthorizationOperation operationWithAuthorizationURL:pusher.authorizationURL channelName:self.name socketID:pusher.connection.socketID];
[authOperation setCompletionHandler:^(PTPusherChannelAuthorizationOperation *operation) {
completionHandler(operation.isAuthorized, operation.authorizationData, operation.connectionError);
-
- if (operation.isAuthorized) {
- _cachedAuthData = operation.authorizationData;
- }
}];
if ([pusher.delegate respondsToSelector:@selector(pusher:willAuthorizeChannelWithRequest:)]) {

0 comments on commit 5bd0c5a

Please sign in to comment.