# Function: broadcastReconnectNotification()

> 

> **broadcastReconnectNotification**(`wss`, `opts`?): `void`

Defined in: [packages/server/src/adapters/ws.ts:1072](https://github.com/trpc/trpc/blob/d3882f3c11e377b07c867e394846454da57a0f42/packages/server/src/adapters/ws.ts#L1072)

Tells every open client of a WebSocket server to reconnect, for example
before a deploy. Use it where you have the server but not the handler
`applyWSSHandler` returns, such as `fastify.websocketServer` with the
Fastify adapter. Every open client gets the message, including ones that
tRPC doesn't serve.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `wss` | `Pick`\<[`WSServer`](https://trpc.io/docs/typedoc/server/adapters/ws/interfaces/WSServer.md)\<[`WSClient`](https://trpc.io/docs/typedoc/server/adapters/ws/interfaces/WSClient.md)\>, `"clients"`\> | - |
| `opts`? | \{ `experimental_encoder`: [`Encoder`](https://trpc.io/docs/typedoc/server/adapters/ws/interfaces/Encoder.md); \} | - |
| `opts.experimental_encoder`? | [`Encoder`](https://trpc.io/docs/typedoc/server/adapters/ws/interfaces/Encoder.md) | The encoder the server was set up with, if not JSON. **Default** `jsonEncoder` |

## Returns

`void`

## Example

```ts
broadcastReconnectNotification(fastify.websocketServer);
await fastify.close();
```

## See

https://trpc.io/docs/server/adapters/fastify#telling-clients-to-reconnect
