I'm organizing my code with nRF SDK v17.0.0,using the board nRF52832 that designed by myself.
In order to support multi-central,the peer_manager module is used.So that I can use peer_id and conn_handle to get another one.
Such as I will save peer_id and conn_handle about a new security connection at pm_evt_handler that are contained in pm_evt_t that be called back.
Maybe due to the quickly connect and disconnect,sometimes the conn_handle that I saved is not equal to the one that get from pm_conn_handle_get().
And it seem either the save one or the get one be used in ble_nus_data_send() seem also can return NRF_SUCCESS but the data is not send to the aim.
So I try to poll the save conn_handle and the get conn_handle,if they are not equaled,I will try to disconnect the connection so that they can try to connect again.
But it seem inoperative.
I want to get the way to solve it.And the code as follow.