Add catch for NotConnectedException to restart SSM.