Skip to content

Commit 095ce43

Browse files
committed
Fix cases where we checked Transport|None against Transport
1 parent f46a25a commit 095ce43

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/workflows/services/common_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def transport(self, value: CommonTransport) -> None:
186186

187187
def start_transport(self):
188188
"""If a transport object has been defined then connect it now."""
189-
if self.transport:
189+
if self._transport:
190190
if self.transport.connect():
191191
self.log.debug("Service successfully connected to transport layer")
192192
else:
@@ -246,7 +246,7 @@ def start_transport(self):
246246

247247
def stop_transport(self):
248248
"""If a transport object has been defined then tear it down."""
249-
if self.transport:
249+
if self._transport:
250250
self.log.debug("Stopping transport object")
251251
self.transport.disconnect()
252252

@@ -459,7 +459,7 @@ def start(self, **kwargs):
459459
except queue.Empty:
460460
task = None
461461

462-
if self.transport and not self.transport.is_connected():
462+
if self._transport and not self.transport.is_connected():
463463
raise workflows.Disconnected("Connection lost")
464464

465465
if task is None:

0 commit comments

Comments
 (0)