stampzilla-go icon indicating copy to clipboard operation
stampzilla-go copied to clipboard

chromecast: dont try to reconnect on unrecoverable error

Open jonaz opened this issue 2 years ago • 1 comments

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

jonaz avatar Nov 21 '22 07:11 jonaz

perhaps send another events.Disconnected{Type:permanent} or a new events.Gone on reconnect error with no route to host.

jonaz avatar Nov 22 '22 19:11 jonaz