DenDragonB / echobot

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Пофиксить лонг поллинг #9

Closed ghost closed 3 years ago

ghost commented 3 years ago

Сейчас если timeout больше 30 секунд то http client выкидывает эксепшн:

wixe@thinkpad /tmp/echobot$ stack exec echobot-exe
echobot-exe: HttpExceptionRequest Request {
  host                 = "api.telegram.org"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/bot1209650876:asdfsdfsdfsadfasdfsadfasdf/getUpdates"
  queryString          = "?timeout=30&offset=0"
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 ResponseTimeout

Из дока:

ResponseTimeoutDefault: Fall back to the manager setting (managerResponseTimeout) or, in its absence, Wait 30 seconds and then throw an exception.

DenDragonB commented 3 years ago

Сделал