diff --git a/bindings/twilio/sendgrid/sendgrid.go b/bindings/twilio/sendgrid/sendgrid.go index 42a1fb02a5..558e2923cf 100644 --- a/bindings/twilio/sendgrid/sendgrid.go +++ b/bindings/twilio/sendgrid/sendgrid.go @@ -206,7 +206,7 @@ func (sg *SendGrid) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*b // Send the email client := sendgrid.NewSendClient(sg.metadata.APIKey) - resp, err := client.Send(email) + resp, err := client.SendWithContext(ctx, email) if err != nil { return nil, fmt.Errorf("error from SendGrid, sending email failed: %+v", err) } diff --git a/bindings/twilio/sms/sms.go b/bindings/twilio/sms/sms.go index ec9cfeca5d..8cea738379 100644 --- a/bindings/twilio/sms/sms.go +++ b/bindings/twilio/sms/sms.go @@ -51,8 +51,10 @@ type twilioMetadata struct { func NewSMS(logger logger.Logger) *SMS { return &SMS{ - logger: logger, - httpClient: &http.Client{}, + logger: logger, + httpClient: &http.Client{ + Timeout: 30 * time.Second, + }, } } diff --git a/go.mod b/go.mod index def1bb632d..17f2bcf529 100644 --- a/go.mod +++ b/go.mod @@ -104,8 +104,8 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/russross/blackfriday v2.0.0+incompatible // indirect github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da - github.com/sendgrid/rest v2.6.3+incompatible // indirect - github.com/sendgrid/sendgrid-go v3.5.0+incompatible + github.com/sendgrid/rest v2.6.9+incompatible // indirect + github.com/sendgrid/sendgrid-go v3.11.1+incompatible github.com/sergi/go-diff v1.2.0 // indirect github.com/stretchr/testify v1.7.1 github.com/supplyon/gremcos v0.1.0 diff --git a/go.sum b/go.sum index 4084b531c4..2a22b2a957 100644 --- a/go.sum +++ b/go.sum @@ -1721,10 +1721,10 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/sendgrid/rest v2.6.3+incompatible h1:h/uruXAzKxVyDDIQX/MkQI73p/gsdpEnb5q2wxSvTsA= -github.com/sendgrid/rest v2.6.3+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= -github.com/sendgrid/sendgrid-go v3.5.0+incompatible h1:kosbgHyNVYVaqECDYvFVLVD9nvThweBd6xp7vaCT3GI= -github.com/sendgrid/sendgrid-go v3.5.0+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= +github.com/sendgrid/rest v2.6.9+incompatible h1:1EyIcsNdn9KIisLW50MKwmSRSK+ekueiEMJ7NEoxJo0= +github.com/sendgrid/rest v2.6.9+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= +github.com/sendgrid/sendgrid-go v3.11.1+incompatible h1:ai0+woZ3r/+tKLQExznak5XerOFoD6S7ePO0lMV8WXo= +github.com/sendgrid/sendgrid-go v3.11.1+incompatible/go.mod h1:QRQt+LX/NmgVEvmdRw0VT/QgUn499+iza2FnDca9fg8= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty4DZO54I4FGqIpto=