jgneff commented on PR #4206:
URL: https://github.com/apache/netbeans/pull/4206#issuecomment-1151904628
> Please leave the connection attempts in place.
Just to clarify, this pull request leaves the connection attempts in place:
* `http_proxy` if set and working;
* otherwise, `https_proxy` if set and working;
* otherwise, a direct connection.
The difference is that it tries them one at a time, in order, and uses every
connection it makes.
Before this change, the build:
* makes up to three connections for every one connection used,
* has a race condition that determines which connection to use,
* doesn't properly close the unused connections it makes, and
* makes direct connections even when proxies are defined and working.
This pull request fixes all four issues.
For example, after this change, I see only three connections from the proxy
server to `netbeans.osuosl.org` during a NetBeans build on Launchpad:
```
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 570446 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 227491 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 50266718 "-" "Java/11.0.15"
```
Before this change, I saw 85 such connections, with 81 of them unnecessary
and abandoned (just 137 bytes transferred):
```
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 6331 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 570446 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 227491 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
^^^ 75 more lines just like the one above ^^^
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 137 "-" "Java/11.0.15"
"CONNECT netbeans.osuosl.org:443 HTTP/1.1" 200 50266718 "-" "Java/11.0.15"
```
When testing locally, before this change there were 617 connections made but
only 17 of them actually used. The build made 600 unnecessary connections
through the proxy: 136 to `netbeans.osuosl.org` and 464 to `repo1.maven.org`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists