Add guard to prevent a ThriftSocket from being closed twice.