We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63661d9 commit 51f5af9Copy full SHA for 51f5af9
WebHostLib/customserver.py
@@ -270,15 +270,19 @@ async def start_room(room_id):
270
await ctx.shutdown_task
271
272
except (KeyboardInterrupt, SystemExit):
273
- pass
274
- except Exception:
+ if ctx.saving:
+ ctx._save()
275
+ except Exception as e:
276
with db_session:
277
room = Room.get(id=room_id)
278
room.last_port = -1
279
+ logger.exception(e)
280
raise
281
+ else:
282
283
284
finally:
285
try:
- ctx._save()
286
with (db_session):
287
# ensure the Room does not spin up again on its own, minute of safety buffer
288
0 commit comments