Compare commits
2 commits
70789fc593
...
57871afa68
Author | SHA1 | Date | |
---|---|---|---|
57871afa68 | |||
6857615585 |
2 changed files with 13 additions and 2 deletions
6
.renovaterc.json
Normal file
6
.renovaterc.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"local>infrastructure/renovate-config"
|
||||
]
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package websocket
|
||||
|
||||
import (
|
||||
"git.smsvc.net/pomodoro/ChronoTomato/internal/notifications"
|
||||
"git.smsvc.net/pomodoro/ChronoTomato/internal/shared"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.smsvc.net/pomodoro/ChronoTomato/internal/notifications"
|
||||
"git.smsvc.net/pomodoro/ChronoTomato/internal/shared"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
@ -18,6 +18,11 @@ func ProcessServerMessages(conn *websocket.Conn) {
|
|||
for {
|
||||
_, message, err := conn.ReadMessage()
|
||||
if err != nil {
|
||||
if websocket.IsCloseError(err, 1000) {
|
||||
// Ignore normal closure and exit gracefully
|
||||
return
|
||||
}
|
||||
// Log any other errors
|
||||
fmt.Println()
|
||||
log.Error("Read error!", "reason", err)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue