From 104ead09874f04f58abf3867c47435030234ac50 Mon Sep 17 00:00:00 2001 From: eta Date: Tue, 18 Aug 2020 17:55:31 +0100 Subject: [PATCH] Handle errors that occur when trying to start a connection --- stuff.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stuff.lisp b/stuff.lisp index a328552..285f308 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -855,7 +855,12 @@ Returns three values: avatar data (as two values), and a generalized boolean spe (when old-conn (admin-msg comp jid "(destroying your old connection)") (whatscl::close-connection old-conn)) - (whatscl::start-connection conn))))))) + (handler-case + (whatscl::start-connection conn) + (error (e) + (admin-msg comp jid (format nil "Connection failed:~% ~A" e)) + (admin-msg comp jid "(will retry)") + (setf stored-conn nil))))))))) (defun start-user-registration (comp jid) "Register the JID as wanting to use the bridge COMP."