add ssl.SSLError hanlding in restart functor