# reconnect() function · @imqueue/pg-pubsub

Source: https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.reconnect/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-pubsub 3.0.5 — generated reference, not hand-written

`'reconnect'` event occurs each time, when the connection is successfully established after connection retry. It is followed by a corresponding `'connect'` event, but after all possible channel locks finished their attempts to be re-acquired.

**Signature:**

```typescript
export declare function reconnect(retries: number): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| retries | number | number of retries made before re-connect succeeded |


**Returns:**

void

