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 the connection used by https #256

Merged
merged 10 commits into from
Dec 23, 2024

Conversation

YushiIso
Copy link
Contributor

@YushiIso YushiIso commented Nov 8, 2017

a socket of the connection created by https request remains.
Read and Write Connection will be shutdown if the connection is rebuilt or the connection is terminated.
however, the socket used by connection is not closed.
you can find it by using the "lsof" command.

the remaining connection is closed by time out, but I think that it is a problem if "high traffic" or "many clients use it".
it is better to close the used connection.

@elazarl
Copy link
Owner

elazarl commented May 30, 2018

Can you write a test demonstrating that? So that it fails before your commit and succeed afterwards?

@oec
Copy link

oec commented Aug 31, 2018

@elazarl, I can confirm this issue. I created a test for this (on linux) that will fail before the commit and succeed afterwards: https://gist.github.com/oec/34d6acf1457b779ed7e446ddf3275762.

@elazarl
Copy link
Owner

elazarl commented Sep 2, 2018 via email

@oec
Copy link

oec commented Sep 2, 2018

That would be @YushiIso's job, I suppose, as he owns the PR.

@elazarl
Copy link
Owner

elazarl commented Sep 2, 2018 via email

@YushiIso
Copy link
Contributor Author

YushiIso commented Sep 3, 2018

@oec Thanks!!
Added test to the PR.

@elazarl
Copy link
Owner

elazarl commented Sep 3, 2018 via email

@oec
Copy link

oec commented Sep 26, 2018

@elazarl, when is the best moment for the merge, if not now? :)

oec added a commit to oec/goproxy that referenced this pull request Nov 28, 2018
Important changes:

Fixes elazarl#256:  connections are closed after usage, so FD-count remains
congruent with the actual amount of open connections.

Added ProxyHttpServer.Signer of type
	type Signer func(ca *tls.Certificate, hostname []string) (*tls.Certificate, error)
If ProxyHttpServer.Signer is set, the goproxy uses that function to
retrieve Certificates for TLS-interception.  This allows consumers of
goproxy to implement f.e. caching of certificates.

Minor changes:

- adjusted import-path to github.com/oec/goproxy
- go fmt on all files
ppmag added a commit to ppmag/goproxy that referenced this pull request Dec 28, 2019
@ErikPelli
Copy link
Collaborator

ErikPelli commented Dec 20, 2024

Can someone fix the issues with the tests? Is this problem still actual?
@oec @YushiIso

@ErikPelli ErikPelli merged commit ffb746c into elazarl:master Dec 23, 2024
1 check passed
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.

4 participants