all: Remove or convert deprecated API usages (#8459)

This commit is contained in:
Jakob Borg
2022-07-28 17:14:49 +02:00
committed by GitHub
parent 7e26f74f38
commit 7bdb5faa9c
7 changed files with 10 additions and 11 deletions
+1 -2
View File
@@ -48,12 +48,11 @@ func (c *dynamicClient) serve(ctx context.Context) error {
l.Debugln(c, "looking up dynamic relays")
req, err := http.NewRequest("GET", uri.String(), nil)
req, err := http.NewRequestWithContext(ctx, "GET", uri.String(), nil)
if err != nil {
l.Debugln(c, "failed to lookup dynamic relays", err)
return err
}
req.Cancel = ctx.Done()
data, err := http.DefaultClient.Do(req)
if err != nil {
l.Debugln(c, "failed to lookup dynamic relays", err)
+1 -1
View File
@@ -204,7 +204,7 @@ func performHandshakeAndValidation(conn *tls.Conn, uri *url.URL) error {
}
cs := conn.ConnectionState()
if !cs.NegotiatedProtocolIsMutual || cs.NegotiatedProtocol != protocol.ProtocolName {
if cs.NegotiatedProtocol != protocol.ProtocolName {
return errors.New("protocol negotiation error")
}