func (c *Conn) Close() error {
	c.mu.Lock()
	if c.shutdown || c.closing {
		c.mu.Unlock()
		return ErrClosed
	}
	c.closing = true
	c.mu.Unlock()
	return c.stream.Close()
}
func (c *Conn) Close() error {
	c.mu.Lock()
	if c.shutdown || c.closing {
		c.mu.Unlock()
		return ErrClosed
	}
	c.closing = true
	c.mu.Unlock()
	return c.stream.Close()
}
func ( c * Conn ) Close ( ) error { c . mu . Lock ( ) if c . shutdown || c . closing { c . mu . Unlock ( ) return ErrClosed } c . closing = true c . mu . Unlock ( ) return c . stream . Close ( ) }
// Close closes the JSON-RPC connection. The connection may not be
// used after it has been closed.
Close closes the JSON - RPC connection . The connection may not be used after it has been closed .