mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-25 09:25:50 +00:00
Show server PID in settings
This commit is contained in:
parent
6a918aeab6
commit
969fd2e327
3 changed files with 17 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ final class BunServer {
|
|||
|
||||
var bindAddress: String = "127.0.0.1"
|
||||
|
||||
/// The process identifier of the running server, if available
|
||||
var processIdentifier: Int32? {
|
||||
process?.processIdentifier
|
||||
}
|
||||
|
||||
/// Local authentication token for bypassing auth on localhost
|
||||
private let localAuthToken: String = {
|
||||
// Generate a secure random token for this session
|
||||
|
|
|
|||
|
|
@ -101,6 +101,11 @@ class ServerManager {
|
|||
private(set) var isRestarting = false
|
||||
private(set) var lastError: Error?
|
||||
|
||||
/// The process ID of the running server, if available
|
||||
var serverProcessId: Int32? {
|
||||
bunServer?.processIdentifier
|
||||
}
|
||||
|
||||
/// Track if we're in the middle of handling a crash to prevent multiple restarts
|
||||
private var isHandlingCrash = false
|
||||
/// Number of consecutive crashes for backoff
|
||||
|
|
|
|||
|
|
@ -216,6 +216,13 @@ private struct ServerStatusSection: View {
|
|||
.font(.system(.body, design: .monospaced))
|
||||
}
|
||||
}
|
||||
|
||||
if let pid = serverManager.serverProcessId {
|
||||
LabeledContent("Process ID") {
|
||||
Text("\(pid)")
|
||||
.font(.system(.body, design: .monospaced))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Divider()
|
||||
|
|
|
|||
Loading…
Reference in a new issue