Skip to content

Commit

Permalink
Revert "event stream: update the realtime connection ID on every requ…
Browse files Browse the repository at this point in the history
…est"

This reverts commit b4fec48.
  • Loading branch information
sumnerevans committed Jan 17, 2024
1 parent 8d3cafe commit f98e4ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linkedin_messaging/linkedin.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ async def _listen_to_event_stream(self):

if cc := data.get("com.linkedin.realtimefrontend.ClientConnection", {}):
logging.info(f"Got realtime connection ID: {cc.get('id')}")
self._request_headers["x-li-realtime-session"] = cc.get("id")
self._realtime_sesion_id = cc.get("id")
if not self._realtime_sesion_id:
logging.info("No existing realtime connection ID, setting the ID")
self._request_headers["x-li-realtime-session"] = cc.get("id")
self._realtime_sesion_id = cc.get("id")

event_payload = data.get("com.linkedin.realtimefrontend.DecoratedEvent", {}).get(
"payload", {}
Expand Down

0 comments on commit f98e4ce

Please sign in to comment.