close the connection when connection-id is invalid

This commit is contained in:
Shaka Chen 2022-08-03 15:09:41 +08:00
parent 3f1f908f6b
commit a05ff40e97

View file

@ -214,6 +214,9 @@ the default answer. (Private)"
c)))) c))))
(setf (gethash id *connection-ids*) connection) (setf (gethash id *connection-ids*) connection)
(setf (gethash connection *connections*) id)) (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 (t
(setf id (random-hex-string)) (setf id (random-hex-string))
(setf (gethash connection *connections*) id) (setf (gethash connection *connections*) id)