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.
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