diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 1a2bd792f3ebfd..56adea0fb23046 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -151,6 +151,8 @@ CHIP_ERROR ChipDeviceController::ConnectDevice(NodeId remoteDeviceId, IPAddress err = mSessionManager->Init(mLocalDeviceId, mInetLayer, Transport::UdpListenParameters().SetAddressType(deviceAddr.Type())); SuccessOrExit(err); + mSessionManager->SetDelegate(&mCallback); + // connected state before 'OnConnect' so that key exchange is accepted mConState = kConnectionState_Connected;