Skip to content

Commit

Permalink
event stream: add logging on timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <sumner@beeper.com>
  • Loading branch information
sumnerevans committed Jan 18, 2024
1 parent c16b5f5 commit 667dd9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linkedin_messaging/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,8 @@ async def start_listener(self, user_urn: URN):
try:
self._heartbeat_task = asyncio.create_task(self._send_heartbeat(user_urn))
await self._listen_to_event_stream()
except asyncio.exceptions.TimeoutError as te:
except asyncio.TimeoutError as te:
logging.exception(f"Timeout in listener: {te}")
# Special handling for TIMEOUT handler.
if timeout_handlers := self.event_listeners.get("TIMEOUT"):
for handler in timeout_handlers:
Expand Down

0 comments on commit 667dd9b

Please sign in to comment.