@@ -35,18 +35,13 @@ void BindingHandler::Init()
35
35
DeviceLayer::PlatformMgr ().ScheduleWork (InitInternal);
36
36
}
37
37
38
- void BindingHandler::OnInvokeCommandFailure (DeviceProxy * aDevice, BindingData & aBindingData, CHIP_ERROR aError)
38
+ void BindingHandler::OnInvokeCommandFailure (BindingData & aBindingData, CHIP_ERROR aError)
39
39
{
40
40
CHIP_ERROR error;
41
41
42
42
if (aError == CHIP_ERROR_TIMEOUT && !BindingHandler::GetInstance ().mCaseSessionRecovered )
43
43
{
44
44
LOG_INF (" Response timeout for invoked command, trying to recover CASE session." );
45
- if (!aDevice)
46
- return ;
47
-
48
- // Release current CASE session.
49
- aDevice->Disconnect ();
50
45
51
46
// Set flag to not try recover session multiple times.
52
47
BindingHandler::GetInstance ().mCaseSessionRecovered = true ;
@@ -85,9 +80,7 @@ void BindingHandler::OnOffProcessCommand(CommandId aCommandId, const EmberBindin
85
80
BindingHandler::GetInstance ().mCaseSessionRecovered = false ;
86
81
};
87
82
88
- auto onFailure = [aDevice, dataRef = *data](CHIP_ERROR aError) mutable {
89
- BindingHandler::OnInvokeCommandFailure (aDevice, dataRef, aError);
90
- };
83
+ auto onFailure = [dataRef = *data](CHIP_ERROR aError) mutable { BindingHandler::OnInvokeCommandFailure (dataRef, aError); };
91
84
92
85
if (aDevice)
93
86
{
@@ -162,9 +155,7 @@ void BindingHandler::LevelControlProcessCommand(CommandId aCommandId, const Embe
162
155
BindingHandler::GetInstance ().mCaseSessionRecovered = false ;
163
156
};
164
157
165
- auto onFailure = [aDevice, dataRef = *data](CHIP_ERROR aError) mutable {
166
- BindingHandler::OnInvokeCommandFailure (aDevice, dataRef, aError);
167
- };
158
+ auto onFailure = [dataRef = *data](CHIP_ERROR aError) mutable { BindingHandler::OnInvokeCommandFailure (dataRef, aError); };
168
159
169
160
CHIP_ERROR ret = CHIP_NO_ERROR;
170
161
0 commit comments