🥅 Caught error from in socket_server
This commit is contained in:
@@ -14,6 +14,7 @@ settings = settings()
|
|||||||
async def join_game(sid, data):
|
async def join_game(sid, data):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
redis_res = await redis.get(f"game:{data['game_pin']}")
|
redis_res = await redis.get(f"game:{data['game_pin']}")
|
||||||
|
try:
|
||||||
if json.loads(redis_res)["captcha_enabled"]:
|
if json.loads(redis_res)["captcha_enabled"]:
|
||||||
try:
|
try:
|
||||||
async with session.post(
|
async with session.post(
|
||||||
@@ -28,6 +29,8 @@ async def join_game(sid, data):
|
|||||||
print("CAPTCHA FAILED")
|
print("CAPTCHA FAILED")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
if redis_res is None:
|
if redis_res is None:
|
||||||
await sio.emit("game_not_found", room=sid)
|
await sio.emit("game_not_found", room=sid)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user