Accept reconnection only if the connection-id is valid

This commit is contained in:
Shaka Chen 2022-08-03 14:58:49 +08:00
parent e0aeae7690
commit 9315a0fee6

View file

@ -203,7 +203,7 @@ the default answer. (Private)"
(defun handle-new-connection (connection id)
"Handle new incoming websocket CONNECTIONS with ID from boot page. (Private)"
(handler-case
(cond (id
(cond ((and id (gethash id *connection-data*))
(format t "Reconnection id - ~A to ~A~%" id connection)
(setf (gethash id *connection-ids*) connection)
(setf (gethash connection *connections*) id))