> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# ChaosDisconnectOptions

> Interface exported by @botmesh/core/testing.

Defined in: [testing/chaos.ts:223](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L223)

Connection drops and reconnects.

## Properties

### afterInbound?

```ts theme={null}
afterInbound?: number[];
```

Defined in: [testing/chaos.ts:225](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L225)

Drop the connection right after the Nth delivered inbound event (1-based).

***

### probability?

```ts theme={null}
probability?: number;
```

Defined in: [testing/chaos.ts:227](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L227)

Probability `[0, 1]` of a drop after each delivered inbound event. Default `0`.

***

### downtimeMs?

```ts theme={null}
downtimeMs?: number;
```

Defined in: [testing/chaos.ts:229](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L229)

Downtime before the automatic reconnect of these drops. Default `10` ms; `Infinity` = until `reconnect()`.

***

### reason?

```ts theme={null}
reason?: DisconnectReason;
```

Defined in: [testing/chaos.ts:231](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L231)

Reason carried by the `closed` update. Default `'transient'`.

***

### failSendsWhileDown?

```ts theme={null}
failSendsWhileDown?: boolean;
```

Defined in: [testing/chaos.ts:233](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L233)

Reject sends while down with [ChaosDisconnectedError](https://botmesh.afaya.com.co/api/core/testing/classes/ChaosDisconnectedError.md). Default `true`.

***

### holdInboundWhileDown?

```ts theme={null}
holdInboundWhileDown?: boolean;
```

Defined in: [testing/chaos.ts:235](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L235)

Hold inbound events while down and deliver them after the reconnect. Default `true`.

***

### replayOnReconnect?

```ts theme={null}
replayOnReconnect?: number;
```

Defined in: [testing/chaos.ts:237](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L237)

On reconnect, redeliver this many of the most recently delivered events (offline-sync replay). Default `0`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.