a year ago
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/state.py", line 110, in wsconnect
await self.gateway.run()
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/gateway.py", line 171, in run
await self.dispatch_opcode(data, op)
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/gateway.py", line 177, in dispatch_opcode
return await self.send_heartbeat()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/gateway.py", line 303, in send_heartbeat
await self.send_json({"op": OPCODE.HEARTBEAT, "d": self.sequence}, bypass=True)
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/websocket.py", line 165, in send_json
await self.send(serialized, bypass)
File "/opt/venv/lib/python3.11/site-packages/interactions/api/gateway/websocket.py", line 153, in send
await self.ws.send_str(data)
File "/opt/venv/lib/python3.11/site-packages/aiohttp/clientws.py", line 165, in sendstr
await self._writer.send(data, binary=False, compress=compress)
File "/opt/venv/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 729, in send
await self.sendframe(message, WSMsgType.TEXT, compress)
File "/opt/venv/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 675, in _send_frame
self._write(header + mask + message)
File "/opt/venv/lib/python3.11/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport.
————————
i have multiple discord bots running on my host but for some reason my newest one is throwing this error and closing itself off.
0 Replies
Seems to be happening when I call await ctx.defer() (a discord bot functionally to leave a connection open for discord longer than usual)
a year ago
this is unlikely to be an issue with railway, the more likely cause is that discord is closing the connection