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

Use TCP sockets on Windows #2297

Merged
merged 8 commits into from Oct 7, 2019
Merged

Use TCP sockets on Windows #2297

merged 8 commits into from Oct 7, 2019

Conversation

@smashwilson
Copy link
Member

smashwilson commented Oct 7, 2019

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Set allowHalfOpen on sockets bound by GitPromptServer. Send data with socket.end() calls. Together, this should avoid the "data lingers in a buffer" problem that I suspect is the root cause of #1130 and #2236.

Use TCP connections on loopback instead of named pipes on Windows to enable this.

Screenshot/Gif

N/A

Alternate Designs

Using TCP sockets everywhere might be reasonable.

Benefits

More responsive git commands, especially on Windows and in cases where authentication dialogs are requested.

Possible Drawbacks

None.

Applicable Issues

#1130 and #2236, but I'm not going to declare victory without confirmation.

Metrics

N/A

Tests

N/A

Documentation

N/A

Release Notes

  • Restructured communications that implement authentication prompt dialogs to avoid buffering delays.

User Experience Research (Optional)

N/A

smashwilson added 3 commits Oct 7, 2019
@codecov

This comment has been minimized.

Copy link

codecov bot commented Oct 7, 2019

Codecov Report

Merging #2297 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2297      +/-   ##
=========================================
+ Coverage   93.28%   93.3%   +0.01%     
=========================================
  Files         228     228              
  Lines       12889   12893       +4     
  Branches     1846    1847       +1     
=========================================
+ Hits        12024   12030       +6     
+ Misses        865     863       -2
Impacted Files Coverage Δ
lib/git-prompt-server.js 100% <100%> (+6.45%) ⬆️
lib/git-temp-dir.js 100% <100%> (ø) ⬆️
lib/git-shell-out-strategy.js 99.8% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0df9f44...9163e51. Read the comment docs.

smashwilson added 5 commits Oct 7, 2019
@smashwilson smashwilson merged commit 505223a into master Oct 7, 2019
8 checks passed
8 checks passed
atom.github Build #20191007.2 succeeded
Details
atom.github (Lint) Lint succeeded
Details
atom.github (Linux) Linux succeeded
Details
atom.github (MacOS) MacOS succeeded
Details
atom.github (Snapshot) Snapshot succeeded
Details
atom.github (Windows) Windows succeeded
Details
codecov/patch 100% of diff hit (target 93.28%)
Details
codecov/project 93.3% (+0.01%) compared to 0df9f44
Details
@smashwilson smashwilson deleted the aw/tcp-on-windows branch Oct 7, 2019
@lkashef lkashef mentioned this pull request Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.