diff --git a/examples/streaming/http/main.go b/examples/streaming/http/main.go index 79ab2805..e166ff2f 100644 --- a/examples/streaming/http/main.go +++ b/examples/streaming/http/main.go @@ -72,4 +72,6 @@ func main() { // close client dgClient.Stop() + + log.Printf("Program exiting...\n") } diff --git a/examples/streaming/microphone/main.go b/examples/streaming/microphone/main.go index 6f7da2f5..76caab87 100644 --- a/examples/streaming/microphone/main.go +++ b/examples/streaming/microphone/main.go @@ -127,4 +127,8 @@ func main() { // close DG client dgClient.Stop() + + log.Printf("Program exiting...\n") + // time.Sleep(120 * time.Second) + } diff --git a/examples/streaming/replay/main.go b/examples/streaming/replay/main.go index 9e3a0a78..886094f5 100644 --- a/examples/streaming/replay/main.go +++ b/examples/streaming/replay/main.go @@ -86,4 +86,6 @@ func main() { // close client dgClient.Stop() + + log.Printf("Program exiting...\n") } diff --git a/pkg/client/live/client.go b/pkg/client/live/client.go index 25cd4968..7b52fb47 100644 --- a/pkg/client/live/client.go +++ b/pkg/client/live/client.go @@ -379,6 +379,7 @@ func (c *Client) Write(p []byte) (int, error) { // Stop will send close message and shutdown websocket connection func (c *Client) Stop() { klog.V(3).Infof("WebSocketClient::Stop Stopping...\n") + c.retry = false c.ctxCancel() c.closeWs() }