Beispiel #1
0
func (ic *incomingConnection) terminate() {
	tls := ic.tls
	if tls != nil {
		tls.Close()
	}
	tcpConn := ic.tcpConn
	if tcpConn != nil {
		tcpConn.Close()
	}
	return
}
Beispiel #2
0
func (nc *nodeConnection) terminate() {
	if nc == nil {
		return
	}

	tls := nc.tls
	if tls != nil {
		tls.Close()
	}
	conn := nc.conn
	if conn != nil {
		conn.Close()
	}
	rawOutput := nc.rawOutput
	if rawOutput != nil {
		rawOutput.Close()
	}
	rawInput := nc.rawInput
	if rawInput != nil {
		rawInput.Close()
	}
}