fix(proxy_server.py): don't reconnect prisma if already connected

This commit is contained in:
Krrish Dholakia 2024-01-09 11:38:42 +05:30
parent e97eff4243
commit cd350ab8d8
3 changed files with 8 additions and 4 deletions

View file

@ -555,7 +555,8 @@ class PrismaClient:
)
async def connect(self):
try:
await self.db.connect()
if self.db.is_connected() == False:
await self.db.connect()
except Exception as e:
asyncio.create_task(
self.proxy_logging_obj.failure_handler(original_exception=e)