Compare commits

..

1 Commits

Author SHA1 Message Date
bel
db1838b3ab up matrix timeout in http client 2022-02-25 21:59:54 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ func uploadImage(b []byte) (string, error) {
request.Header.Set("Authorization", "Bearer "+images.AccessToken)
request.Header.Set("Content-Type", writer.FormDataContentType())
c := &http.Client{Timeout: time.Minute}
c := &http.Client{Timeout: time.Minute * 5}
response, err := c.Do(request)
if err != nil {
return "", err

View File

@@ -51,7 +51,7 @@ func (m Matrix) getclient() (*gomatrix.Client, error) {
return nil, err
}
client.Client = &http.Client{
Timeout: time.Minute,
Timeout: time.Minute * 5,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,