catch ConnectException

Hi, and thanks for this work! I was getting a lot of ConnectExceptions so I added a catch block for it.