---
name: "offSessionStatusChange"
mode: "kit"
versionRequirements:
  - { name: "P2PKit", version: "1.0.0" }
platform:
  - "iOS"
  - "Android"
async: true
title: "ty.p2p.offSessionStatusChange - Stop listening for: Session status change callback"
---

## offSessionStatusChange

> [VERSION] P2PKit >= 1.0.0

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

P2P status changed event

### Parameters

`(listener: Function)`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: ThingP2PSessionStatus) => void` | Yes | - | Event listener callback function |

### Referenced Types

##### `interface` ThingP2PSessionStatus

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | `2.0.0` | Device ID |
| `status` | `number` | `2.0.0` | status: value < 0 indicates disconnected |


### Examples

```tsx
const listener = function (res) { console.log(res) }
ty.p2p.onSessionStatusChange(listener)
ty.p2p.offSessionStatusChange(listener)
```
