Skip to content

Commit cb15dc8

Browse files
fix: reset _busPromise on publish failure to allow reconnect (#146)
1 parent 55d308c commit cb15dc8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/status.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ function write(data: Record<string, unknown>): void {
143143
})
144144
.catch((err) => {
145145
console.warn("[brain] Bus publish failed:", (err as Error).message);
146+
_busPromise = null; // reset to allow reconnect
146147
});
147148
}
148149

0 commit comments

Comments
 (0)