Fix p2pclient locking