Fix panics due to concurrent websocket writes

This commit is contained in:
Lubos Dolezel
2023-02-24 11:49:26 +01:00
parent 8bee96aeff
commit f27cbfb299
21 changed files with 131 additions and 141 deletions

View File

@@ -4,8 +4,8 @@ import (
"context"
"fmt"
"github.com/gorilla/websocket"
"saml.dev/gome-assistant/internal"
ws "saml.dev/gome-assistant/internal/websocket"
)
func BuildService[
@@ -26,7 +26,7 @@ func BuildService[
Scene |
TTS |
Vacuum,
](conn *websocket.Conn, ctx context.Context) *T {
](conn *ws.WebsocketWriter, ctx context.Context) *T {
return &T{conn: conn, ctx: ctx}
}