stampzilla-go
stampzilla-go copied to clipboard
chromecast: dont try to reconnect on unrecoverable error
For example no route to host
there are no need to reconnect. We will rediscover it once (if) it reconnects.
Nov 21 08:34:32 bulan stampzilla-chromecast[16403]: time="2022-11-21T08:34:32.492178137+01:00" level=error msg="error reconnect: failed to connect to Chromecast. Error:dial tcp 192.168.13.227:8009: connect: no route to host" func="github.com/stampzilla/gocast.(*Device).Connect.func1" file="/home/stampzilla/go/pkg/mod/github.com/stampzilla/[email protected]/device_connection.go:73" ip=192.168.13.227 name="Kitchen speaker" port=8009
perhaps send another events.Disconnected{Type:permanent} or a new events.Gone on reconnect error with no route to host.