Skip to content

Commit

Permalink
Clean up deprecations in federation code too
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Jul 5, 2023
1 parent 1fd3cb3 commit cf6ab10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion matrix/federation.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package matrix

import (
"context"
"crypto/tls"
"encoding/json"
"errors"
Expand Down Expand Up @@ -242,7 +243,7 @@ func FederatedGet(url string, realHost string, ctx rcontext.RequestContext) (*ht
DisableKeepAlives: true,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
// Based on https://github.com/matrix-org/gomatrixserverlib/blob/51152a681e69a832efcd934b60080b92bc98b286/client.go#L74-L90
DialTLS: func(network, addr string) (net.Conn, error) {
DialTLSContext: func(ctx2 context.Context, network, addr string) (net.Conn, error) {
rawconn, err := net.Dial(network, addr)
if err != nil {
return nil, err
Expand Down

0 comments on commit cf6ab10

Please sign in to comment.