#1645·ioredis

无法确定底层连接是否已被杀死

作者: phawxby创建于 2022年9月2日更新于 2026年9月11日
标签stale

如果client.quit ()'被称作client.status',我期望client.status'能够更新到断开 ' 或closing'之类的东西,然后完成关闭'。 这是不可能的。

控制台.log( 此为.   redisclient?. status);
等待。  redisclient?.quit();
控制台.log( 此为.   redisclient?. status);
等待。  redisclient?.quit();
控制台.log( 此为.   redisclient?. status);

输出

准备
准备
[恐惧] 未处理出错事件: 出错: 写入 EPIPE
在 Write 发送后( 节点: 内部/ 流  base  commons: 164: 15)
在写入 Generic (节点: 内部/ 流  base  commons: 15: 5: 3)

使用“ wait this. redisclient?.quit( ) ” 也可以使用。

顺便说一句,最好能把一些 tsdocs 关于状态,所以它们的意思是显而易见的,例如,结束'和接近'之间的区别是什么? https://GitHub.com/luin/ioredis/blob/main/lib/ZRedis.ts#L37-L44 (中文(简体) )