Skip to content

Commit

Permalink
fix(vecu): Terminte endless loop in case of error
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandjarisch authored and rumpelsepp committed Jan 4, 2024
1 parent bd3ef54 commit d432e88
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/gallia/services/uds/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,12 @@ async def handle_client(
if uds_response_raw is not None:
writer.write(hexlify(uds_response_raw) + b"\n")
await writer.drain()
except Exception:
except Exception as e:
logger.error(
f"Unexpected exception when handling client communication: {e!r}"
)
traceback.print_exc()
break

logger.info("Connection closed")
logger.info(
Expand All @@ -897,8 +901,12 @@ async def run(self) -> None:

if uds_response_raw is not None:
await transport.write(uds_response_raw)
except Exception:
except Exception as e:
logger.error(
f"Unexpected exception when handling client communication: {e!r}"
)
traceback.print_exc()
break


class UnixUDSServerTransport(TCPUDSServerTransport):
Expand Down

0 comments on commit d432e88

Please sign in to comment.