Running a socket emit in a library action causes errors since 5.8.0
:
ClientClosedError: The client is closed
at Commander._RedisClient_sendCommand (/Users/tobi/dev/wpaas/node_modules/@redis/client/dist/lib/client/index.js:490:31)
at Commander.commandsExecutor (/Users/tobi/dev/wpaas/node_modules/@redis/client/dist/lib/client/index.js:188:154)
at Commander.BaseClass.<computed> [as publish] (/Users/tobi/dev/wpaas/node_modules/@redis/client/dist/lib/commander.js:8:29)
at RedisAdapter.broadcast (/Users/tobi/dev/wpaas/node_modules/@socket.io/redis-adapter/dist/index.js:473:28)
at BroadcastOperator.emit (/Users/tobi/dev/wpaas/node_modules/socket.io/dist/broadcast-operator.js:169:26)
at App.exports.emit (/Users/tobi/dev/wpaas/lib/modules/sockets.js:20:42)
at App._exec (/Users/tobi/dev/wpaas/lib/core/app.js:608:57)
at App.exec (/Users/tobi/dev/wpaas/lib/core/app.js:544:20)
at App._exec (/Users/tobi/dev/wpaas/lib/core/app.js:565:25)
at async App._exec (/Users/tobi/dev/wpaas/lib/core/app.js:575:17)
Executing the socket emit directly in an API workflow works without issues. Running it via exec or include library action
causes the above error.
The library action only contains a socket emit and nothing else.