(self, sid: str, path_str: str)
| 590 | self._leave_room(sid, current) |
| 591 | |
| 592 | def _leave_room(self, sid: str, path_str: str) -> None: |
| 593 | session = self.sessions.get(path_str) |
| 594 | if not session: |
| 595 | return |
| 596 | if sid in session.subscribers: |
| 597 | session.subscribers.discard(sid) |
| 598 | leave_room(session.room, sid=sid) |
| 599 | if not session.subscribers: |
| 600 | session.stop() |
| 601 | |
| 602 | def current_path(self, sid: str) -> Optional[str]: |
| 603 | return self.sid_to_path.get(sid) |
no test coverage detected