fix NetworkOnMainThread bug for deleteDevice operation.