Repository navigation
fix(ssh): stop a stale log sink failure from clearing its successor - #15
Open
andreas-byfut wants to merge 1 commit into
Open
andreas-byfut wants to merge 1 commit into
andreas-byfut wants to merge 1 commit into
Conversation
A SessionLogSink's failure callback ran on the reader thread and unconditionally cleared logSink and isLogging. If logging had been restarted meanwhile, the late callback dropped the new sink, so the new log silently lost its output while the UI showed logging off. Changes to logSink and isLogging now happen under one lock, and a failure only detaches the sink that reported it. The caller's onFailure fires only when that sink was still the current one, so a stale failure no longer reports "logging stopped" while logging is running.
Owner
|
Hey. Looks like a good change, however please can you make 2 revisions. I believe that a sink that has been stopped or replaced now fails silently. It only flushges on close, so if for whatever reason it cant write (ie, disk filled, storage revoked) logged loses the end of the log. Would suggest keeping the toast notif Please adda a test. SshConnection builds in JVM (see FakeSshConnection). |
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.
A session log sink reports write failures on the reader thread. It used to clear
logSinkandisLoggingunconditionally. If logging had been restarted in the meantime, the late callbackdropped the new sink, so the new log lost its output while the UI showed logging as off.
logSinkandisLoggingnow happen under one lock, and a failure detaches only thesink that reported it.
still the current one.
Known limits:
SshConnectionbuilds its ownSSHClientand has no seam forone.