Skip to content

Commit f875d91

Browse files
committed
Avoid comparing URLs
1 parent bee8b11 commit f875d91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/kotlin/com/coder/gateway/CoderRemoteConnectionHandle.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class CoderRemoteConnectionHandle {
206206
BrowserUtil.browse(getTokenUrl)
207207
} else {
208208
val (u, t) = settings.readConfig(settings.coderConfigDir)
209-
if (url == u?.toURL() && !t.isNullOrBlank() && t != existingToken) {
209+
if (url.toString() == u && !t.isNullOrBlank() && t != existingToken) {
210210
logger.info("Injecting token for $url from CLI config")
211211
return Pair(t, TokenSource.CONFIG)
212212
}

src/main/kotlin/com/coder/gateway/views/steps/CoderWorkspacesStepView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ class CoderWorkspacesStepView : CoderWizardStep<CoderWorkspacesStepSelection>(
462462
newURL,
463463
// If this is a new URL there is no point in trying to use the same
464464
// token.
465-
if (oldURL == newURL) fields.token else null,
465+
if (oldURL.toString() == newURL.toString()) fields.token else null,
466466
isRetry,
467467
fields.useExistingToken,
468468
settings,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy