nodejs连接redis,经常掉线,然后重新连接,报错:Redis connection lost and command aborted. It might have been processed.

UnhandledPromiseRejectionWarning: AbortError: Redis connection lost and command aborted. It might have been processed.
    at RedisClient.flush_and_error (C:\workspace\MainData\node_modules\redis\index.js:362:23)
    at RedisClient.connection_gone (C:\workspace\MainData\node_modules\redis\index.js:664:14)
    at RedisClient.on_error (C:\workspace\MainData\node_modules\redis\index.js:410:10)
    at Socket.<anonymous> (C:\workspace\MainData\node_modules\redis\index.js:279:14)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:8088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8088) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:8088) UnhandledPromiseRejectionWarning: AbortError: Redis connection lost and command aborted. It might have been processed.
    at RedisClient.flush_and_error (C:\workspace\MainData\node_modules\redis\index.js:362:23)
    at RedisClient.connection_gone (C:\workspace\MainData\node_modules\redis\index.js:664:14)
    at RedisClient.on_error (C:\workspace\MainData\node_modules\redis\index.js:410:10)
    at Socket.<anonymous> (C:\workspace\MainData\node_modules\redis\index.js:279:14)
    at Socket.emit (events.js:198:13)
    at emitErrorNT (internal/streams/destroy.js:91:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:8088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

可以在node里用websocket 链接redis频道,并监听,里面写个轮循,断了就去重新链接,我的这个博客看下(websocket(Redis,node, react 三方处理)),希望对你有帮助。

https://blog.csdn.net/weixin_43648947/article/details/100009465

跟我碰到的问题一样,只有我的笔记本wifi有这个问题,公司台式机固定网线,同样版本node就没问题,网上试过所有方法,都没解决。请问兄台解决了吗?