relayer receive loop is done
Receive loop looks right. Still need the send loop. And, a complication is that some messages git-annex sends need to be wrapped in REPLY_ASYNC, while others do not. So will probably need to split externalSend into two.
This commit is contained in:
parent
06a4ab39fa
commit
15706e6991
4 changed files with 73 additions and 46 deletions
|
@ -615,7 +615,7 @@ startExternal external =
|
|||
(st, extensions) <- startExternal' external
|
||||
if asyncExtensionEnabled extensions
|
||||
then do
|
||||
v <- liftIO $ runRelayToExternalAsync st
|
||||
v <- liftIO $ runRelayToExternalAsync external st
|
||||
st' <- liftIO $ relayToExternalAsync v
|
||||
store (ExternalAsync v)
|
||||
return st'
|
||||
|
@ -625,9 +625,9 @@ startExternal external =
|
|||
v@NoExternalAsync -> do
|
||||
store v
|
||||
fst <$> startExternal' external
|
||||
v@(ExternalAsync ExternalAsyncRelay) -> do
|
||||
v@(ExternalAsync relay) -> do
|
||||
store v
|
||||
liftIO $ relayToExternalAsync v
|
||||
liftIO $ relayToExternalAsync relay
|
||||
where
|
||||
store = liftIO . atomically . putTMVar (externalAsync external)
|
||||
|
||||
|
@ -677,7 +677,7 @@ startExternal' external = do
|
|||
exwanted <- receiveMessage st external
|
||||
(\resp -> case resp of
|
||||
EXTENSIONS_RESPONSE l -> result l
|
||||
UNSUPPORTED_REQUEST -> result []
|
||||
UNSUPPORTED_REQUEST -> result mempty
|
||||
_ -> Nothing
|
||||
)
|
||||
(const Nothing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue