Repository navigation
test(desktop-linux): destroy fake VNC sockets so a port prober cannot hang close - #487
Merged
Merged
Conversation
… hang close A local port prober can connect to the fake VNC server while the stalled connect test waits 2 s, and it keeps its end open. The server only half-closed its side, so server.close() in afterEach waited forever. Destroy each socket after the RFB write. Closes #480
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The stalled-connect test in
viewer-state.test.tssometimes timed out inafterEach. The hook waits forserver.close()on the fake VNC servers, and that wait did not end.A local port prober caused it. While the test waits 2 s, a process on the host connected to the fake server's loopback port and kept its end open. On the author's machine this was an IDE port detector. The fake server only half-closed its side with
socket.end("RFB"), so the open connection heldserver.close()open. The server now destroys each socket after the RFB write.Closes #480
No device pass: this changes one test helper and no product behavior.
ss -tnpbeforeserver.close()server.close()hangs; a host process holds two ESTAB connections to the fake server portprobe-7.log,probe-11.logbefore-main-*.logafter-*.log,after-rebase.logtsc --noEmit, PickCheck, gitleakslint-480-481.logEvidence paths are under
~/.pickforge/investigations/480/on the author's machine.Review: