From 3a4c44190d9303ca1dca831eb52a7a9aa50d4f7d Mon Sep 17 00:00:00 2001 From: Gaurang Talwadkar Date: Tue, 29 Mar 2016 17:19:35 +0530 Subject: [PATCH] Change in signature for SRConnectionStateChangedBlock Changed signature for SRConnectionStateChangedBlock for passing oldState along with newState --- SignalR.Client/SRConnection.h | 2 +- SignalR.Client/SRConnection.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SignalR.Client/SRConnection.h b/SignalR.Client/SRConnection.h index e211bbae..7405e512 100644 --- a/SignalR.Client/SRConnection.h +++ b/SignalR.Client/SRConnection.h @@ -36,7 +36,7 @@ typedef void (^SRConnectionErrorBlock)(NSError *); typedef void (^SRConnectionClosedBlock)(); typedef void (^SRConnectionReconnectingBlock)(); typedef void (^SRConnectionReconnectedBlock)(); -typedef void (^SRConnectionStateChangedBlock)(connectionState); +typedef void (^SRConnectionStateChangedBlock)(connectionState, connectionState); typedef void (^SRConnectionConnectionSlowBlock)(); @interface SRConnection : NSObject diff --git a/SignalR.Client/SRConnection.m b/SignalR.Client/SRConnection.m index 01d98072..b80474db 100644 --- a/SignalR.Client/SRConnection.m +++ b/SignalR.Client/SRConnection.m @@ -196,7 +196,7 @@ - (BOOL)changeState:(connectionState)oldState toState:(connectionState)newState SRLogConnectionDebug(@"connection state did change from %u to %u", oldState, newState); if (self.stateChanged){ - self.stateChanged(self.state); + self.stateChanged(oldState, newState); } if (self.delegate && [self.delegate respondsToSelector:@selector(SRConnection:didChangeState:newState:)]) {