Branch: refs/heads/master
  Home:   https://github.com/NixOS/nix
  Commit: 51800e06dec91282b81fc41e56d1e9325849d2c2
      
https://github.com/NixOS/nix/commit/51800e06dec91282b81fc41e56d1e9325849d2c2
  Author: Ludovic Courtès <[email protected]>
  Date:   2014-03-18 (Tue, 18 Mar 2014)

  Changed paths:
    M src/nix-daemon/nix-daemon.cc

  Log Message:
  -----------
  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.


  Commit: 3fc056927c962ec9778e94528f2f9ae316afca4e
      
https://github.com/NixOS/nix/commit/3fc056927c962ec9778e94528f2f9ae316afca4e
  Author: Eelco Dolstra <[email protected]>
  Date:   2014-03-18 (Tue, 18 Mar 2014)

  Changed paths:
    M src/nix-daemon/nix-daemon.cc

  Log Message:
  -----------
  Fix tabs


Compare: https://github.com/NixOS/nix/compare/f93e97517e44...3fc056927c96
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to