Skip to content

make connected keyword writable for pi-daemon#143

Open
mikelangmayr wants to merge 1 commit into
mainfrom
mike/pi-daemon-connected
Open

make connected keyword writable for pi-daemon#143
mikelangmayr wants to merge 1 commit into
mainfrom
mike/pi-daemon-connected

Conversation

@mikelangmayr

Copy link
Copy Markdown
Contributor
  • make connected keyword writable for pi-daemon

Comment thread daemons/hsfei/pi-daemon
if not (self.ip_address and self.tcp_port):
raise RuntimeError("no hardware ip_address/tcp_port configured")
# Disconnect the whole daisy chain before reconnecting
self.controller.disconnect_all()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a request to "connect" when the daemon is already connected will lead the daemon to disconnect then reconnect. You could instead consider having it just check if the connection is good and if it is, doing nothing; no need to toggle the connection.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danechever if it's connected it will just return, that's the _controller_repsonsive() check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants