We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a03570b commit 965f416Copy full SHA for 965f416
Commands/Get-WebSocket.ps1
@@ -1205,10 +1205,14 @@ function Get-WebSocket {
1205
. $SocketClientJob -Variable $Variable
1206
return
1207
}
1208
+
1209
+ # If -Debug was not passed, we're running in a background thread job.
1210
$webSocketJob =
1211
if ($SocketUrl) {
1212
+ # If we had no name, we will use the SocketUrl as the name.
1213
if (-not $name) {
- $Name = $SocketUrl
1214
+ # and we will ensure that it starts with `ws://` or `wss://`
1215
+ $Name = $SocketUrl -replace '^http', 'ws'
1216
1217
1218
$existingJob = foreach ($jobWithThisName in (Get-Job -Name $Name -ErrorAction Ignore)) {
0 commit comments