Close connection for unknown peers

This commit is contained in:
akovalenko committed 2024-05-17 16:09:05 +03:00
1 parent b27c9fe7bc
commit aabd2f33f1
1 file changed
+2
+2
View File
@@ -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")
}