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 connection to avoid waiting for timeout #41

Closed
wants to merge 1 commit into from

Conversation

frapontillo
Copy link

When using node-google-apps-script as a module dependency, I'd like to have the auth command return immediately after the user has logged in.

This is currently impossible since the http server uses keep-alive connections, that aren't immediately terminated when doing server.close().

The solution, used by the http-shutdown module is to close the socket underlying the IncomingMessage request.

@lricoy lricoy self-requested a review December 8, 2017 17:17
@lricoy lricoy self-assigned this Dec 8, 2017
@lricoy
Copy link
Collaborator

lricoy commented Dec 15, 2017

Hi @frapontillo . Thanks for the PR! Is req.socket.destroy() really necessary? I don't know if it will even work (haven't tried). According to the docs, after calling response.end() the property is nulled.

@lricoy
Copy link
Collaborator

lricoy commented Dec 15, 2017

Hi @frapontillo would #80 work for you?

@frapontillo
Copy link
Author

No idea, it's been too long 😂

@lricoy lricoy closed this Jan 7, 2018
@lricoy
Copy link
Collaborator

lricoy commented Jan 7, 2018

Fixed in #80

@lricoy lricoy removed their request for review January 7, 2018 16:05
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.

2 participants