func (c *conn) Close() error {
	klog.Info("conn.Close()")
	req := &client.Packet{
		Type: client.PacketType_CLOSE_REQ,
		Payload: &client.Packet_CloseRequest{
			CloseRequest: &client.CloseRequest{
				ConnectID: c.connID,
			},
		},
	}

	klog.V(6).Infof("[tracing] send req, type: %s", req.Type)

	if err := c.stream.Send(req); err != nil {
		return err
	}

	select {
	case errMsg := <-c.closeCh:
		if errMsg != "" {
			return errors.New(errMsg)
		}
		return nil
	case <-time.After(CloseTimeout):
	}

	return errors.New("close timeout")
}
// Close closes the connection. It also sends CLOSE_REQ packet over
// proxy service to notify remote to drop the connection.
Close closes the connection. It also sends CLOSE_REQ packet over
proxy service to notify remote to drop the connection.
// Close closes the connection . It also sends CLOSE_REQ packet over // proxy service to notify remote to drop the connection .
func (c *conn) Close() error {
	klog.Info("conn.Close()")
	req := &client.Packet{
		Type: client.PacketType_CLOSE_REQ,
		Payload: &client.Packet_CloseRequest{
			CloseRequest: &client.CloseRequest{
				ConnectID: c.connID,
			},
		},
	}
	klog.V(6).Infof("[tracing] send req, type: %s", req.Type)
	if err := c.stream.Send(req); err != nil {
		return err
	}
	select {
	case errMsg := <-c.closeCh:
		if errMsg != "" {
			return errors.New(errMsg)
		}
		return nil
	case <-time.After(CloseTimeout):
	}
	return errors.New("close timeout")
}
func ( c * conn ) Close ( ) error { klog . Info ( " " ) req := & client . Packet { Type : client . PacketType_CLOSE_REQ , Payload : & client . Packet_CloseRequest { CloseRequest : & client . CloseRequest { ConnectID : c . connID , } , } , } klog . V ( 6 ) . Infof ( " " , req . Type ) if err := c . stream . Send ( req ) ; err != nil { return err } select { case errMsg := <- c . closeCh : if errMsg != " " { return errors . New ( errMsg ) } return nil case <- time . After ( CloseTimeout ) : } return errors . New ( " " ) }
Close closes the connection.
Close closes the connection .