libcollectdclient: don't close socket twice