From a05ff40e9715e4a44f27a8bd9f64fa71ef3c2479 Mon Sep 17 00:00:00 2001 From: Shaka Chen Date: Wed, 3 Aug 2022 15:09:41 +0800 Subject: [PATCH] close the connection when connection-id is invalid --- source/clog-connection.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/clog-connection.lisp b/source/clog-connection.lisp index eeb9fdc..6f8cf00 100644 --- a/source/clog-connection.lisp +++ b/source/clog-connection.lisp @@ -214,6 +214,9 @@ the default answer. (Private)" c)))) (setf (gethash id *connection-ids*) connection) (setf (gethash connection *connections*) id)) + (id + (format t "Reconnection id ~A not found. Closing the connection.~%" id) + (websocket-driver:close-connection connection)) ; Don't send the reason for better security. (t (setf id (random-hex-string)) (setf (gethash connection *connections*) id)