Skip to content

Commit

Permalink
Report Errors when negotiate fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Billingsley committed Aug 25, 2014
1 parent a2d145c commit 704ea8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SignalR.Client/SRConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ - (void)negotiate:(id<SRClientTransportInterface>)transport {

__weak __typeof(&*self)weakSelf = self;
[transport negotiate:self connectionData:_connectionData completionHandler:^(SRNegotiationResponse *negotiationResponse, NSError *error) {
__strong __typeof(&*weakSelf)strongSelf = weakSelf;
if (!error) {
__strong __typeof(&*weakSelf)strongSelf = weakSelf;
SRLogConnection(@"negotiation was successful %@",negotiationResponse);

[strongSelf verifyProtocolVersion:negotiationResponse.protocolVersion];
Expand All @@ -150,6 +150,10 @@ - (void)negotiate:(id<SRClientTransportInterface>)transport {
}

[strongSelf startTransport];
} else {
SRLogConnection(@"negotiation failed %@", error);

[strongSelf didReceiveError:error];
}
}];
}
Expand Down

0 comments on commit 704ea8b

Please sign in to comment.