mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
[sse] add 30 minutes write timeout
This commit is contained in:
parent
a87adefafb
commit
cefb6fa7bb
@ -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 {
|
||||
|
||||
@ -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"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user