Handle errors that occur when trying to start a connection

This commit is contained in:
eta 2020-08-18 17:55:31 +01:00
parent 8944391580
commit 104ead0987

View file

@ -855,7 +855,12 @@ Returns three values: avatar data (as two values), and a generalized boolean spe
(when old-conn (when old-conn
(admin-msg comp jid "(destroying your old connection)") (admin-msg comp jid "(destroying your old connection)")
(whatscl::close-connection old-conn)) (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) (defun start-user-registration (comp jid)
"Register the JID as wanting to use the bridge COMP." "Register the JID as wanting to use the bridge COMP."