fix [BUG] WebUI cannot connect to the gateway started by WebUI (#2267)
#2213
This commit is contained in:
parent
84edc462d6
commit
778f939302
1 changed files with 4 additions and 4 deletions
|
|
@ -23,19 +23,19 @@ func isProcessRunning(pid int) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
handle, _, err := procOpenProcess.Call(
|
handle, _, _ := procOpenProcess.Call(
|
||||||
uintptr(processQueryLimitedInformation),
|
uintptr(processQueryLimitedInformation),
|
||||||
0,
|
0,
|
||||||
uintptr(pid),
|
uintptr(pid),
|
||||||
)
|
)
|
||||||
if handle == 0 || err != nil {
|
if handle == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
defer procCloseHandle.Call(handle)
|
defer procCloseHandle.Call(handle)
|
||||||
|
|
||||||
var exitCode uint32
|
var exitCode uint32
|
||||||
ret, _, err := procGetExitCodeProcess.Call(handle, uintptr(unsafe.Pointer(&exitCode)))
|
ret, _, _ := procGetExitCodeProcess.Call(handle, uintptr(unsafe.Pointer(&exitCode)))
|
||||||
if ret == 0 || err != nil {
|
if ret == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return exitCode == stillActive
|
return exitCode == stillActive
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue