Set http timeout to 10 seconds

This commit is contained in:
Wim 2017-02-17 17:51:07 +01:00
parent 2d16fd085e
commit fe258e1b67
1 changed files with 1 additions and 0 deletions

View File

@ -103,6 +103,7 @@ func (m *MMClient) Login() error {
// login to mattermost // login to mattermost
m.Client = model.NewClient(uriScheme + m.Credentials.Server) m.Client = model.NewClient(uriScheme + m.Credentials.Server)
m.Client.HttpClient.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}} m.Client.HttpClient.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: m.SkipTLSVerify}}
m.Client.HttpClient.Timeout = time.Second * 10
var myinfo *model.Result var myinfo *model.Result
var appErr *model.AppError var appErr *model.AppError
var logmsg = "trying login" var logmsg = "trying login"