added timout to deepl post request
This commit is contained in:
2
main.go
2
main.go
@@ -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
|
||||
|
Reference in New Issue
Block a user