HCOLL-134 better handling of toString() and close() of the TCP connections