fix formating
dont try to disconnect if socket already disconnected
broad test on travis