Skip to content

chore: respond to banner code review#152

Merged
kruton merged 1 commit into
connectbot:mainfrom
kruton:tailscale-support
May 20, 2026
Merged

chore: respond to banner code review#152
kruton merged 1 commit into
connectbot:mainfrom
kruton:tailscale-support

Conversation

@kruton
Copy link
Copy Markdown
Member

@kruton kruton commented May 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 20, 2026 06:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors SSH USERAUTH banner handling to remove duplicated “receive banner(s) then final auth result” loops and makes the FakeSshServer’s banner/failure helpers deterministic by sending packets directly from a suspending function.

Changes:

  • Refactor SshConnection auth flows to use a shared receiveAuthResult() helper that consumes SSH_MSG_USERAUTH_BANNER results before returning the terminal auth result.
  • Update FakeSshServer test helpers to send USERAUTH_BANNER and USERAUTH_FAILURE via suspend functions rather than fire-and-forget launch.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sshlib/src/test/kotlin/org/connectbot/sshlib/client/FakeSshServer.kt Makes banner/failure packet sends suspending to ensure ordering and avoid background coroutine timing issues in tests.
sshlib/src/main/kotlin/org/connectbot/sshlib/client/SshConnection.kt Deduplicates banner-consumption logic across auth methods via receiveAuthResult().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kruton kruton merged commit bff22a4 into connectbot:main May 20, 2026
10 checks passed
@kruton kruton deleted the tailscale-support branch May 20, 2026 07:01
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.

2 participants