fix: allow configurable webhook request timeout from config.toml

This commit is contained in:
Abhinav Raut
2025-07-07 00:26:31 +05:30
parent 9a119e6dc3
commit 389c4e3dd3
2 changed files with 2 additions and 2 deletions

View File

@@ -210,7 +210,7 @@ Triggered when an existing message is updated.
## Delivery and Retries
- Webhooks are delivered with a 10-second timeout
- Webhooks requests timeout can be configured in the `config.toml` file
- Failed deliveries are not automatically retried
- Webhook delivery runs in a background worker pool for better performance
- If the webhook queue is full (configurable in config.toml file), new events may be dropped

View File

@@ -89,7 +89,7 @@ func New(opts Opts) (*Manager, error) {
db: opts.DB,
deliveryQueue: make(chan DeliveryTask, opts.QueueSize),
httpClient: &http.Client{
Timeout: 10 * time.Second,
Timeout: opts.Timeout,
Transport: &http.Transport{
DialContext: (&net.Dialer{
Timeout: 3 * time.Second,