mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
mediaapi/writers/download: Use DNS address as not all HSes have SRV
This commit is contained in:
parent
cae309fa26
commit
2d822c57f9
1 changed files with 1 additions and 2 deletions
|
@ -25,7 +25,6 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
|
@ -431,7 +430,7 @@ func (r *downloadRequest) createRemoteRequest() (*http.Response, *util.JSONRespo
|
||||||
resErr := jsonerror.InternalServerError()
|
resErr := jsonerror.InternalServerError()
|
||||||
return nil, &resErr
|
return nil, &resErr
|
||||||
}
|
}
|
||||||
url := "https://" + strings.Trim(dnsResult.SRVRecords[0].Target, ".") + ":" + strconv.Itoa(int(dnsResult.SRVRecords[0].Port))
|
url := "https://" + dnsResult.Addrs[0]
|
||||||
|
|
||||||
r.Logger.WithField("URL", url).Info("Connecting to remote")
|
r.Logger.WithField("URL", url).Info("Connecting to remote")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue