added timout to deepl post request

This commit is contained in:
2022-02-12 01:59:32 +01:00
parent 8fe8ec5233
commit 8c672f7186
3 changed files with 19 additions and 11 deletions

View File

@@ -702,7 +702,7 @@ func getMatchChat(w http.ResponseWriter, r *http.Request) {
if translate {
lang, _ := tag[0].Base()
translated, srcLang, err := utils.TranslateWithDeepL(stat.Message, lang.String(),
conf.Csgowtfd.DeepL.BaseURL, conf.Csgowtfd.DeepL.APIKey)
conf.DeepL.BaseURL, conf.DeepL.APIKey, conf.DeepL.Timeout)
if err != nil {
log.Warningf("[GMC] Unable to translate %s with DeepL: %v", stat.Message, err)
goto sendNormalResp