From 6001e257f13c70cd7c6f10b39f8520db179c41fb Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 28 Sep 2023 15:41:03 +0200 Subject: [PATCH] (fix) only listen on ipv4 for the moment --- pkg/integration/integration.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/integration/integration.go b/pkg/integration/integration.go index df06498..25f20c8 100644 --- a/pkg/integration/integration.go +++ b/pkg/integration/integration.go @@ -46,8 +46,9 @@ type Integration struct { func NewIntegration(config Config) (*Integration, error) { i := Integration{ - Config: config, - listenAddress: fmt.Sprintf(":%d", config.ListenPort), + Config: config, + // TODO: for the moment, only IPv4, as somehow the behaviour seems strange when both.. not investigatet though + listenAddress: fmt.Sprintf("0.0.0.0:%d", config.ListenPort), deviceState: DisconnectedDeviceState, DeviceId: "", // I think device_id is not yet implemented in Remote TV, used for multi-device integrati @@ -92,6 +93,7 @@ func (i *Integration) Run() error { } log.Debug("Listen for new Websocket connection") + log.Fatal(http.ListenAndServe(i.listenAddress, nil)) return nil