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

Add -webSocket option by default when creating an inbound agent #9665

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/src/main/java/hudson/slaves/JNLPLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ private String getRemotingOptions(String computerName) {
sb.append("-name ");
sb.append(computerName);
sb.append(' ');
if (isWebSocket()) {
sb.append("-webSocket ");
}
sb.append("-webSocket ");
Copy link
Member

Choose a reason for hiding this comment

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

Could check for isConfigured() before unconditionally appending this, but OTOH the most common reason for this to be considered “configured” is for WebSocket to be enabled, so in practice that would not make much difference.

if (tunnel != null) {
sb.append(" -tunnel ");
sb.append(tunnel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ slaveAgent.cli.run=Run from agent command line:
slaveAgent.cli.run.secret=Or run from agent command line, with the secret stored in a file:
powerShell.cli.curl=Note: PowerShell users must use curl.exe instead of curl because curl is a default PowerShell cmdlet alias for Invoke-WebRequest.
commonOptions=\
The most commonly used option is <code>-webSocket</code>. \
If you prefer to use TCP instead of WebSockets, remove the <code>-webSocket</code> option. \
Run <code>java -jar agent.jar -help</code> for more.
tcp-port-disabled=\
The TCP port is disabled so TCP agents may not be connected. \
Expand Down
Loading