It looks like you're new here. If you want to get involved, click one of these buttons!
try: .....except ConectionResetError: # Re-try, etc
You can handle connection errors as below: