Skip to content

Commit

Permalink
Move const to where it's used
Browse files Browse the repository at this point in the history
  • Loading branch information
ravicious authored and github-actions committed Jul 29, 2024
1 parent 2907446 commit c5c762d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/vnet/daemon/client_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ func startByCalling(ctx context.Context, bundlePath string, config Config) error
}

if errorDomain == nsCocoaErrorDomain && errorCode == errorCodeNSXPCConnectionInterrupted {
const clientNSXPCConnectionInterruptedDebugMsg = "The connection was interrupted when trying to " +
"reach the XPC service. If there's no clear error logs on the daemon side, it might mean that " +
"the client does not satisfy the code signing requirement enforced by the daemon. " +
"Start capturing logs in Console.app and repeat the scenario. Look for " +
"\"xpc_support_check_token: <private> error: <private> status: -67050\" in the logs to verify " +
"that the connection was interrupted due to the code signing requirement."
log.DebugContext(ctx, clientNSXPCConnectionInterruptedDebugMsg)
errC <- trace.Wrap(errXPCConnectionInterrupted)
return
Expand Down Expand Up @@ -333,13 +339,6 @@ func startByCalling(ctx context.Context, bundlePath string, config Config) error
}
}

const clientNSXPCConnectionInterruptedDebugMsg = "The connection was interrupted when trying to " +
"reach the XPC service. If there's no clear error logs on the daemon side, it might mean that " +
"the client does not satisfy the code signing requirement enforced by the daemon. " +
"Start capturing logs in Console.app and repeat the scenario. Look for " +
"\"xpc_support_check_token: <private> error: <private> status: -67050\" in the logs to verify " +
"that the connection was interrupted due to the code signing requirement."

func sleepOrDone(ctx context.Context, d time.Duration) error {
timer := time.NewTimer(d)
defer timer.Stop()
Expand Down

0 comments on commit c5c762d

Please sign in to comment.