Skip to content

Commit 373ad30

Browse files
committed
Also handle invalid state errors
1 parent 35fde18 commit 373ad30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/utils/queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class Queue {
117117
await writer.write(item.data);
118118
item.sent = true;
119119
} catch (error) {
120-
if (error?.code === 'ECONNRESET') {
120+
if (error?.code === 'ECONNRESET' || error?.code === 'ERR_INVALID_STATE') {
121121
writer.releaseLock();
122122
this.lock = false;
123123
throw error;

0 commit comments

Comments
 (0)