Skip to content

Commit

Permalink
Merge pull request #52 from pollen-robotics/51-need-end-of-session-si…
Browse files Browse the repository at this point in the history
…gnal

51 need end of session signal
  • Loading branch information
FabienDanieau authored Oct 23, 2024
2 parents aea65be + b934f3e commit ddbdc4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/gst_signalling/gst_abstract_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ async def close_session(self, session_id: str) -> None:
session = self.sessions.pop(session_id)
self._pipeline.remove(session.pc)
session.pc.set_state(Gst.State.NULL)
# self.emit("close_session", session)
# await session.pc.close()
self.emit("close_session", session)

async def send_sdp(self, session_id: str, sdp: Dict[str, Dict[str, str]]) -> None:
await self.signalling.send_peer_message(session_id, "sdp", sdp)
Expand Down
4 changes: 2 additions & 2 deletions src/gst_signalling/gst_signalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def close(self) -> None:

self.logger.info("Closing connection.")
await self.ws.close()
self.logger.info("Closed.")
self.logger.debug("Closed.")

# Messages (server --> peer)
async def _handler(self) -> None:
Expand All @@ -95,7 +95,7 @@ async def _handler(self) -> None:
async for data in self.ws:
assert isinstance(data, str)

self.logger.info(f"Received message: {data}")
self.logger.debug(f"Received message: {data}")
message: Dict[str, Any] = json.loads(data)
await self._handle_messages(message)
except asyncio.CancelledError:
Expand Down

0 comments on commit ddbdc4d

Please sign in to comment.