remove shutdown method on the Connection (#4249)

There's no need to have a dedicated shutdown method, as the use case
(shutting down an outgoing connection attempt on context cancellation)
can be achieved by using Connection.destroy.
This commit is contained in:
Marten Seemann
2024-01-18 22:06:04 -08:00
committed by GitHub
parent d3c2020ecd
commit b3eb375bc1
11 changed files with 39 additions and 130 deletions

View File

@@ -232,7 +232,7 @@ func (c *client) dial(ctx context.Context) error {
select {
case <-ctx.Done():
c.conn.shutdown()
c.conn.destroy(nil)
return context.Cause(ctx)
case err := <-errorChan:
return err