twilio / twilio-go

A Go package for communicating with the Twilio API.
MIT License
271 stars 40 forks source link

EOF error response when sending SMS OTP #231

Open LuPhungMinhHuy opened 4 months ago

LuPhungMinhHuy commented 4 months ago

Issue Summary

I received an ambiguous error response below when calling function VerifyV2.CreateVerification

Post "https://verify.twilio.com/v2/Services/xxxxxxx/Verifications/": EOF

Strange thing is it happened very random, like it was poping out once in thousands of success SMS OTP that were sent by my service.

I did a bit of research and maybe this is what happen: https://stackoverflow.com/questions/28046100/golang-http-concurrent-requests-post-eof

Is there any way to workaround this?

Technical details:

tiwarishubham635 commented 1 month ago

I think we can add req.Close = true in our client file. What do you think? Infact, if you can try in your local making these changes and see if you are able to make multiple calls or not?