mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-06-16 12:45:14 +02:00
Remove unnecessary dependency golang.org/x/net
This commit is contained in:
parent
7ee108c863
commit
57deed0ce2
|
@ -36,7 +36,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/dlintw/goconf"
|
"github.com/dlintw/goconf"
|
||||||
"golang.org/x/net/context/ctxhttp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -248,8 +247,14 @@ func performRequestWithRedirects(ctx context.Context, client *http.Client, req *
|
||||||
req.Body = ioutil.NopCloser(bytes.NewReader(body))
|
req.Body = ioutil.NopCloser(bytes.NewReader(body))
|
||||||
req.ContentLength = int64(len(body))
|
req.ContentLength = int64(len(body))
|
||||||
}
|
}
|
||||||
resp, err = ctxhttp.Do(ctx, client, req)
|
resp, err = client.Do(req.WithContext(ctx))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
// Prefer context error if it has been cancelled.
|
||||||
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
err = ctx.Err()
|
||||||
|
default:
|
||||||
|
}
|
||||||
if e, ok := err.(*url.Error); !ok || resp == nil || e.Err != ErrUseLastResponse {
|
if e, ok := err.(*url.Error); !ok || resp == nil || e.Err != ErrUseLastResponse {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
1
go.mod
1
go.mod
|
@ -16,6 +16,5 @@ require (
|
||||||
github.com/notedit/janus-go v0.0.0-20200517101215-10eb8b95d1a0
|
github.com/notedit/janus-go v0.0.0-20200517101215-10eb8b95d1a0
|
||||||
github.com/oschwald/maxminddb-golang v1.3.1-0.20190523235738-1960b16a5147
|
github.com/oschwald/maxminddb-golang v1.3.1-0.20190523235738-1960b16a5147
|
||||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b
|
go.etcd.io/etcd v0.5.0-alpha.5.0.20200824191128-ae9734ed278b
|
||||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
|
|
||||||
gopkg.in/dgrijalva/jwt-go.v3 v3.2.0
|
gopkg.in/dgrijalva/jwt-go.v3 v3.2.0
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,10 +22,9 @@
|
||||||
package signaling
|
package signaling
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"golang.org/x/net/context"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVirtualSession(t *testing.T) {
|
func TestVirtualSession(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue