refactor(demo): 移除 finally 块中的断开连接逻辑,优化完成提示信息
This commit is contained in:
@@ -123,10 +123,9 @@ async function main() {
|
|||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Error:', err);
|
console.error('Error:', err);
|
||||||
} finally {
|
|
||||||
disconnect();
|
|
||||||
console.log('\n[done]');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('\n[done] 功能执行完毕,浏览器保持运行。按 Ctrl+C 退出。');
|
||||||
}
|
}
|
||||||
|
|
||||||
main().catch(console.error);
|
main().catch(console.error);
|
||||||
|
|||||||
Reference in New Issue
Block a user