Fix fd leak (when connections fail)