fix: site log unable fetch previous pages

This commit is contained in:
0xJacky 2023-04-29 21:31:47 +08:00
parent 26938ae1bb
commit d5fa42da3c
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
4 changed files with 42 additions and 53 deletions

View file

@ -207,7 +207,7 @@ func tailNginxLog(ws *websocket.Conn, controlChan chan controlStruct, errChan ch
err = ws.WriteMessage(websocket.TextMessage, []byte(line.Text))
if err != nil {
if err != nil && websocket.IsUnexpectedCloseError(err, websocket.CloseNormalClosure) {
errChan <- errors.Wrap(err, "error NginxAccessLog write message")
return
}