pop3 catch and log exceptions
This commit is contained in:
parent
32d5d3d557
commit
1e6655a715
@ -350,11 +350,14 @@ def make_pop_server_callback(mails_path: Path, users: list[User],
|
|||||||
c_state.set(
|
c_state.set(
|
||||||
State(reader=reader, writer=writer, ip=ip, req_id=scfg.next_id()))
|
State(reader=reader, writer=writer, ip=ip, req_id=scfg.next_id()))
|
||||||
logger.info(f"Got pop server callback")
|
logger.info(f"Got pop server callback")
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
return await asyncio.wait_for(start_session(), timeout_seconds)
|
return await asyncio.wait_for(start_session(), timeout_seconds)
|
||||||
finally:
|
finally:
|
||||||
writer.close()
|
writer.close()
|
||||||
await writer.wait_closed()
|
await writer.wait_closed()
|
||||||
|
except:
|
||||||
|
logger.exception("unexpected exception")
|
||||||
|
|
||||||
return session_cb
|
return session_cb
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user