diff --git a/pkg/internal/grpc/stream.go b/pkg/internal/grpc/stream.go index 3b5ffea..5e14430 100644 --- a/pkg/internal/grpc/stream.go +++ b/pkg/internal/grpc/stream.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "git.solsynth.dev/hypernet/nexus/pkg/internal/http/ws" + "github.com/rs/zerolog/log" "git.solsynth.dev/hypernet/nexus/pkg/proto" "github.com/samber/lo" @@ -28,6 +29,11 @@ func (v *Server) PushStream(ctx context.Context, request *proto.PushStreamReques return nil, fmt.Errorf("you must give one of the user id or client id") } + log.Debug(). + Uint64("client_id", request.GetClientId()). + Uint64("user_id", request.GetUserId()). + Msgf("Pushing a websocket package to client / user...") + if len(errs) > 0 { // Partial fail return &proto.PushStreamResponse{ diff --git a/pkg/internal/http/ws/connections.go b/pkg/internal/http/ws/connections.go index b544915..5536bf8 100644 --- a/pkg/internal/http/ws/connections.go +++ b/pkg/internal/http/ws/connections.go @@ -39,7 +39,7 @@ func ClientUnregister(user sec.UserInfo, id uint64) { delete(wsConn[user.ID], id) wsMutex.Unlock() - directory.BroadcastEvent("ws.client.unregister", map[string]any{ + _ = directory.BroadcastEvent("ws.client.unregister", map[string]any{ "user": user.ID, "id": id, })