Close connection for unknown peers
This commit is contained in:
parent
b27c9fe7bc
commit
aabd2f33f1
2
main.go
2
main.go
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user