From c655d03c7430db7a6944acd7f8212fff2499dad2 Mon Sep 17 00:00:00 2001 From: Hans Date: Mon, 30 Dec 2024 16:45:27 +0800 Subject: [PATCH] fix: longer timeout to make receive stable --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 771fd6c..a220801 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -93,7 +93,7 @@ class Printer { } } - async receive(timeout: number = 100): Promise { + async receive(timeout: number = 1000): Promise { return new Promise((resolve, reject) => { const timeoutId = setTimeout(() => reject(new Error('Timeout')), timeout); (this._connection! as EventEmitter).once('data', (data) => {