Tidy up connectUnix bootProc
This commit is contained in:
parent
a437183863
commit
143febc215
|
@ -287,7 +287,7 @@ method retract(e: ShutdownEntity; turn: var Turn; h: Handle) =
|
|||
type
|
||||
SturdyRef = sturdy.SturdyRef[Ref]
|
||||
Resolve = gatekeeper.Resolve[Ref]
|
||||
ConnectProc* = proc (turn: var Turn; a: Assertion): TurnAction {.gcsafe.}
|
||||
ConnectProc* = proc (turn: var Turn; ds: Ref) {.gcsafe.}
|
||||
|
||||
proc connectUnix*(turn: var Turn; path: string; cap: SturdyRef; bootProc: ConnectProc) =
|
||||
var socket = newAsyncSocket(
|
||||
|
@ -335,9 +335,9 @@ proc connectUnix*(turn: var Turn; path: string; cap: SturdyRef; bootProc: Connec
|
|||
run(gatekeeper.relay) do (turn: var Turn):
|
||||
reenable()
|
||||
discard publish(turn, shutdownRef, true)
|
||||
proc duringCallback(turn: var Turn; ds: Assertion; h: Handle): TurnAction =
|
||||
proc duringCallback(turn: var Turn; a: Assertion; h: Handle): TurnAction =
|
||||
let facet = facet(turn) do (turn: var Turn):
|
||||
discard bootProc(turn, ds) # TODO: what to do with this?
|
||||
bootProc(turn, unembed a)
|
||||
proc action(turn: var Turn) =
|
||||
stop(turn, facet)
|
||||
result = action
|
||||
|
|
Loading…
Reference in New Issue