Skip to content

Commit

Permalink
Reinitialize connection on websocket close (Ext-Creators#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan Bhattacharyya authored Mar 20, 2021
1 parent d2df968 commit e077d4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discord/ext/ipc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ async def request(self, endpoint: str, **kwargs):
log.error(
"WebSocket connection unexpectedly closed. IPC Server is unreachable."
)
return {
"error": "IPC Server Unreachable, restart client process.",
"code": 500,
}
await self.session.close()
await self.init_sock()

return await self.request(endpoint, **kwargs)

return recv.json()

0 comments on commit e077d4b

Please sign in to comment.