Skip to content

Commit 7e2fd91

Browse files
committed
fix: align esm and cjs
1 parent a604d13 commit 7e2fd91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cjs/src/pg-notify.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class PGPubSub {
110110
this._debug('[_reconnect] state: ', this.state)
111111

112112
if (!this.reconnectMaxRetries) {
113-
this.close()
113+
await this.close()
114114
return
115115
}
116116

@@ -122,11 +122,11 @@ class PGPubSub {
122122
this.reconnectRetries++
123123

124124
try {
125-
this.client.end()
125+
await this.client.end()
126126
await this._setupClient()
127127
} catch (err) {
128128
if (this.reconnectRetries >= this.reconnectMaxRetries) {
129-
this.close()
129+
await this.close()
130130
throw new Error('[PGPubSub]: max reconnect attempts reached, aborting', err)
131131
}
132132
if (![states.closing, states.connected].includes((this.state))) {

0 commit comments

Comments
 (0)