Close connection for unknown peers

This commit is contained in:
Anton Kovalenko 2024-05-17 16:09:05 +03:00
parent b27c9fe7bc
commit aabd2f33f1

@ -196,6 +196,8 @@ func (h *Handler) ServeWebSocket(wsConn *websocket.Conn, rAddr string) {
loc, ok := h.locations[uuid]
if !ok {
authLog.WithField("uuid", uuid).Error("unknown user")
wsConn.CloseNow()
return
} else {
authLog.WithField("uuid", uuid).Info("logged in")
}