fix recording present on the proxy when proxying DATA-PRESENT

Apparently the protoerrhandler parameter never runs. Also the const
typo prevented the type checker from complaining that relayPUTRecord was
being called with 1 less parameter than needed.

So move the relayPUTRecord out of it.
This commit is contained in:
Joey Hess 2024-10-30 13:09:50 -04:00
parent ccbc5189b5
commit 54dc1d6f6e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -688,8 +688,9 @@ proxyRequest proxydone proxyparams requestcomplete requestmessage protoerrhandle
handlePutMulti_DATA_PRESENT _ _ _ = protoerr
handlePut_DATA_PRESENT remoteside k DATA_PRESENT =
getresponse (runRemoteSide remoteside) DATA_PRESENT $ \resp ->
protoerrhandler (const (relayPUTRecord k remoteside) >> requestcomplete) $
getresponse (runRemoteSide remoteside) DATA_PRESENT $ \resp -> do
void $ relayPUTRecord k remoteside resp
protoerrhandler requestcomplete $
client $ net $ sendMessage resp
handlePut_DATA_PRESENT _ _ _ = protoerr