Allow recovery from isValidPath RPCs with an invalid path
Allow recovery from isValidPath RPCs with an invalid path

Currently, clients cannot recover from an isValidPath RPC with an
invalid path parameter because the daemon closes the connection when
that happens.

More precisely:

  1. in performOp, wopIsValidPath case, ‘readStorePath’ raises an
     ‘Error’ exception;

  2. that exception is caught by the handler in ‘processConnection’;

  3. the handler determines errorAllowed == false, and thus exits after
     sending the message.

This last part is fixed by calling ‘startWork’ early on, as in the patch
below.

The same reasoning could be applied to all the RPCs that take one or
more store paths as inputs, but isValidPath is, by definition, likely to
be passed invalid paths in the first place, so it’s important for this
one to allow recovery.

rowhit/nix,puffnfresh/nix,gridaphobe/nix,gridaphobe/nix,wmertens/nix,puffnfresh/nix,vizanto/nix,nbp/nix,dezgeg/nix,nbp/nix,ehmry/nix,vizanto/nix,NixOS/nix,gebner/nix,shlevy/nix,bjornfor/nix,jcumming/nix,rowhit/nix,bennofs/nix,zimbatm/nix,offlinehacker/nix,garbas/nix,vizanto/nix,peti/nix,garbas/nix,bennofs/nix,wmertens/nix,bjornfor/nix,rycee/nix,dtzWill/nix,aucampia/nix,ehmry/nix,tchajed/nix,nbp/nix,NixOS/nix,ttuegel/nix,ehmry/nix,peti/nix,pikajude/nix,layus/nix,ttuegel/nix,rowhit/nix,joelmo/nix,offlinehacker/nix,zimbatm/nix,dezgeg/nix,zimbatm/nix,gridaphobe/nix,rycee/nix,peti/nix,ttuegel/nix,zimbatm/nix,dezgeg/nix,garbas/nix,aucampia/nix,pikajude/nix,puffnfresh/nix,ttuegel/nix,rycee/nix,dtzWill/nix,bennofs/nix,aucampia/nix,garbas/nix,joelmo/nix,dtzWill/nix,NixOS/nix,tchajed/nix,gebner/nix,dtzWill/nix,gridaphobe/nix,ehmry/nix,bennofs/nix,offlinehacker/nix,garbas/nix,tchajed/nix,dezgeg/nix,shlevy/nix,vizanto/nix,layus/nix,gebner/nix,dtzWill/nix,aucampia/nix,rycee/nix,peti/nix,gebner/nix,jcumming/nix,layus/nix,wmertens/nix,ysangkok/nix,peti/nix,vcunat/nix,layus/nix,acowley/nix,joelmo/nix,dezgeg/nix,bjornfor/nix,NixOS/nix,bjornfor/nix,layus/nix,ehmry/nix,puffnfresh/nix,tchajed/nix,vcunat/nix,shlevy/nix,acowley/nix,vcunat/nix,NixOS/nix,joelmo/nix,pikajude/nix,vcunat/nix,shlevy/nix,ysangkok/nix,ehmry/nix,wmertens/nix,rowhit/nix,offlinehacker/nix,acowley/nix,shlevy/nix,jcumming/nix,ysangkok/nix,nbp/nix,jcumming/nix,acowley/nix,rycee/nix