For legacy versions, when p2pType is 1, the app might crash after the destory method is called. This problem has been fixed in SDK v3.1.1 and later versions.
Before destory is called, stop the preview or callback operation and call disConnect to stop a P2P connection.