We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a604d13 commit 7e2fd91Copy full SHA for 7e2fd91
cjs/src/pg-notify.js
@@ -110,7 +110,7 @@ class PGPubSub {
110
this._debug('[_reconnect] state: ', this.state)
111
112
if (!this.reconnectMaxRetries) {
113
- this.close()
+ await this.close()
114
return
115
}
116
@@ -122,11 +122,11 @@ class PGPubSub {
122
this.reconnectRetries++
123
124
try {
125
- this.client.end()
+ await this.client.end()
126
await this._setupClient()
127
} catch (err) {
128
if (this.reconnectRetries >= this.reconnectMaxRetries) {
129
130
throw new Error('[PGPubSub]: max reconnect attempts reached, aborting', err)
131
132
if (![states.closing, states.connected].includes((this.state))) {
0 commit comments