From 2b1b57ac4d86e3dabef8d1c440719edbde79301c Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Tue, 1 Mar 2022 05:01:49 +0000 Subject: [PATCH] Continuing after stream error --- fedilogue/stream.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fedilogue/stream.go b/fedilogue/stream.go index d2a5850..b3e182b 100644 --- a/fedilogue/stream.go +++ b/fedilogue/stream.go @@ -3,8 +3,7 @@ package main import ( "bufio" "encoding/json" - "fmt" - "log" + // Must be removed later "net/http" "strings" @@ -39,7 +38,7 @@ func StreamPleroma(endpoint string) { for { _, p, err := ws.ReadMessage() if err != nil { - log.Fatal(err) + logWarn(err) break } @@ -62,10 +61,8 @@ func StreamPleroma(endpoint string) { } } - ws.Close() time.Sleep(time.Minute * 10) - } }