Skip to content

Commit

Permalink
increase default makeinvoice client timeout because people are using …
Browse files Browse the repository at this point in the history
…tor.
  • Loading branch information
fiatjaf committed Dec 8, 2021
1 parent a8fd253 commit a204288
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/cockroachdb/pebble v0.0.0-20210812144839-61318a019370
github.com/fiatjaf/go-lnurl v1.4.0
github.com/fiatjaf/makeinvoice v1.3.0
github.com/fiatjaf/makeinvoice v1.3.1
github.com/gorilla/mux v1.8.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/lib/pq v1.10.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/fiatjaf/lightningd-gjson-rpc v1.4.0 h1:Iv5tt4YuNoSMfR39wiV0tqnHYTJ85o
github.com/fiatjaf/lightningd-gjson-rpc v1.4.0/go.mod h1:SQGA0qcY2qypaMXDQlE5V5+2MnLZzQ7NzfRsScliFeE=
github.com/fiatjaf/ln-decodepay v1.0.0 h1:1YUMjvLock+BicMNwoZ/OA3oG2ZYEaJ8AzdS6EGVMTQ=
github.com/fiatjaf/ln-decodepay v1.0.0/go.mod h1:/LWK+ZUa3i8MqbRjIMAiVQS2+NbhwKWlwib2n446cMQ=
github.com/fiatjaf/makeinvoice v1.3.0 h1:DHOOtVV7+regnFKAncK1gKrbyqt+LiwSjvVLXiLzcSI=
github.com/fiatjaf/makeinvoice v1.3.0/go.mod h1:Q5f85OaXDKf+2JY0vnW/50CGE3Sfc4KnJf4VIJHus1M=
github.com/fiatjaf/makeinvoice v1.3.1 h1:RprsP0AUjWFxKQi9Qh7Q4pFa3oFpg3kygAtvojOHZoU=
github.com/fiatjaf/makeinvoice v1.3.1/go.mod h1:Q5f85OaXDKf+2JY0vnW/50CGE3Sfc4KnJf4VIJHus1M=
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA=
github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func main() {
log.Fatal().Err(err).Msg("couldn't process envconfig.")
}

// increase default makeinvoice client timeout because people are using tor
makeinvoice.Client = &http.Client{Timeout: 25 * time.Second}

s.Domain = strings.ToLower(s.Domain)

if s.TorProxyURL != "" {
Expand Down

0 comments on commit a204288

Please sign in to comment.