Skip to content

Commit

Permalink
Update stomptemplate.py
Browse files Browse the repository at this point in the history
fixes #401
  • Loading branch information
stan-dot authored May 30, 2024
1 parent 6f08f68 commit 5dceb15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/blueapi/messaging/stomptemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ def _ensure_subscribed(self, sub_ids: list[str] | None = None) -> None:

def disconnect(self) -> None:
LOGGER.info("Disconnecting...")

if not self.is_connected():
LOGGER.info("Already disconnected")
return

Check warning on line 211 in src/blueapi/messaging/stomptemplate.py

View check run for this annotation

Codecov / codecov/patch

src/blueapi/messaging/stomptemplate.py#L210-L211

Added lines #L210 - L211 were not covered by tests
# We need to synchronise the disconnect on an event because the stomp Connection
# object doesn't do it for us
disconnected = Event()
Expand Down

0 comments on commit 5dceb15

Please sign in to comment.