Continuing after stream error
This commit is contained in:
parent
64052020ea
commit
2b1b57ac4d
@ -3,8 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
// Must be removed later
|
// Must be removed later
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@ -39,7 +38,7 @@ func StreamPleroma(endpoint string) {
|
|||||||
for {
|
for {
|
||||||
_, p, err := ws.ReadMessage()
|
_, p, err := ws.ReadMessage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
logWarn(err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,10 +61,8 @@ func StreamPleroma(endpoint string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ws.Close()
|
ws.Close()
|
||||||
time.Sleep(time.Minute * 10)
|
time.Sleep(time.Minute * 10)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user