Continuing after stream error

This commit is contained in:
Farhan Khan 2022-03-01 05:01:49 +00:00
parent 64052020ea
commit 2b1b57ac4d

View File

@ -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)
}
}