mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-27 12:52:27 +02:00
Deactivation pin fixes
- short control socket name.(in IOS max length is 11) - wait for control server to reply before checking for deactivation pin. - Added separate name for control socket for mobile. - Added stop channel reference to Control client constructor.
This commit is contained in:
committed by
Cuong Manh Le
parent
3ca754b438
commit
8491f9c455
+14
-3
@@ -33,11 +33,22 @@ const (
|
||||
defaultSemaphoreCap = 256
|
||||
ctrldLogUnixSock = "ctrld_start.sock"
|
||||
ctrldControlUnixSock = "ctrld_control.sock"
|
||||
upstreamPrefix = "upstream."
|
||||
upstreamOS = upstreamPrefix + "os"
|
||||
upstreamPrivate = upstreamPrefix + "private"
|
||||
// iOS unix socket name max length is 11.
|
||||
ctrldControlUnixSockMobile = "cd.sock"
|
||||
upstreamPrefix = "upstream."
|
||||
upstreamOS = upstreamPrefix + "os"
|
||||
upstreamPrivate = upstreamPrefix + "private"
|
||||
)
|
||||
|
||||
// ControlSocketName returns name for control unix socket.
|
||||
func ControlSocketName() string {
|
||||
if isMobile() {
|
||||
return ctrldControlUnixSockMobile
|
||||
} else {
|
||||
return ctrldControlUnixSock
|
||||
}
|
||||
}
|
||||
|
||||
var logf = func(format string, args ...any) {
|
||||
mainLog.Load().Debug().Msgf(format, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user