bugfix: close socket once when harbor disconnected