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

## offSessionStatusChange

> [VERSION] P2PKit >= 1.0.0 | @ray-js/ray >= 1.3.15

> [PLATFORM] iOS, Android

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

### Description

P2P status change event

### Parameters

`(listener: Function)`

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

### Referenced Types

##### `interface` ThingP2PSessionStatus

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


### Examples

#### Demo

```tsx
import { p2p } from '@ray-js/ray'

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