[sse] add 30 minutes write timeout

This commit is contained in:
Aleksandr Soloshenko 2025-07-22 14:27:02 +07:00 committed by Aleksandr
parent a87adefafb
commit cefb6fa7bb
2 changed files with 6 additions and 1 deletions

View File

@ -26,11 +26,14 @@ var Module = fx.Module(
return defaultConfig
},
fx.Private,
),
fx.Provide(func(cfg Config) http.Config {
return http.Config{
Listen: cfg.HTTP.Listen,
Proxies: cfg.HTTP.Proxies,
WriteTimeout: 30 * time.Minute, // SSE requires longer timeout
}
}),
fx.Provide(func(cfg Config) db.Config {

View File

@ -1,6 +1,8 @@
package sse
import "github.com/android-sms-gateway/client-go/smsgateway"
import (
"github.com/android-sms-gateway/client-go/smsgateway"
)
type Event struct {
Type smsgateway.PushEventType `json:"event"`