Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close connections unless the header says otherwise #386

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

cjcodes
Copy link
Member

@cjcodes cjcodes commented Sep 21, 2018

Close HTTP connections when done with a request.

This resolves an issue of running Twilio in AWS Lambda, where clients get a socket hang up.

For folks that don't want this additional header and would prefer to recycle connections, a custom implementation of RequestClient can be passed to Twilio via the httpClient option.

const t = new Twilio(sid, token, {
  httpClient: new MyOwnRestClientImpl(),
});

@cjcodes cjcodes merged commit 5f78c1b into master Sep 21, 2018
@cjcodes cjcodes deleted the close-connections branch September 21, 2018 21:25
@dkundel dkundel mentioned this pull request Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants