1. 15 Sep, 2015 1 commit
  2. 27 Aug, 2015 2 commits
  3. 21 Jul, 2015 1 commit
  4. 20 Jul, 2015 1 commit
  5. 18 Jun, 2015 1 commit
    • rht's avatar
      Replace Critical{,f} with Error{,f} · 78b6cc5f
      rht authored
      Except when there is an explicit os.Exit(1) after the Critical line,
      then replace with Fatal{,f}.
      golang's log and logrus already call os.Exit(1) by default with Fatal.
      
      License: MIT
      Signed-off-by: default avatarrht <rhtbot@gmail.com>
      78b6cc5f
  6. 20 May, 2015 2 commits
  7. 28 Apr, 2015 1 commit
  8. 27 Apr, 2015 2 commits
  9. 26 Apr, 2015 1 commit
  10. 20 Apr, 2015 6 commits
    • Tor Arne Vestbø's avatar
      Remove daemon InitDone guard in interrupt handler · bfd12114
      Tor Arne Vestbø authored
      Instead of just terminating right there and then, we cancel the
      context, and let the daemon exit cleanly. This make take a few
      seconds, as the node builder and its child processes do not
      care too much about the context state while building nodes,
      but this can be improved by injecting checks for ctx.Done()
      before time-consuming steps.
      bfd12114
    • Tor Arne Vestbø's avatar
      Handle ipfs command interruption by cancelling the command context · cf6a268c
      Tor Arne Vestbø authored
      Instead of assuming the command is the daemon command and closing
      the node, which resulted in bugs like #1053, we cancel the context
      and let the context children detect the cancellation and gracefully
      clean up after themselves.
      
      The shutdown logging has been moved into the daemon command, where
      it makes more sense, so that commands like ping will not print out
      the same output on cancellation.
      cf6a268c
    • Tor Arne Vestbø's avatar
      Sync up request context with root context just before calling command · 3d057642
      Tor Arne Vestbø authored
      The context passed on from main() may change before we hit callCommand,
      so setting it in Parse is a bit optimistic.
      3d057642
    • Tor Arne Vestbø's avatar
      main: wait for interrupt to finish before ending command invocation · 00a6e595
      Tor Arne Vestbø authored
      If a command invocation such as 'daemon' is interrupted, the interrupt
      handler asks the node to close. The closing of the node will result in
      the command invocation finishing, and possibly returning from main()
      before the interrupt handler is done. In particular, the info logging
      that a graceful shutdown was completed may never reach reach stdout.
      
      As the whole point of logging "Gracefully shut down." is to give
      confidence when debugging that the shutdown was clean, this is
      slightly unfortunate.
      
      The interrupt handler needs to be set up in main() instead of Run(),
      so that we can defer the closing of the interrupt handler until just
      before returning from main, not when Run() returns with a streaming
      result reader.
      00a6e595
    • Tor Arne Vestbø's avatar
      Revert "fix ugly error message when killing commands" · 61efc4de
      Tor Arne Vestbø authored
      This reverts commit f74e71f9.
      
      The 'Online' flag of the command context does not seem to be set in
      any code paths, at least not when running commands such as 'ipfs daemon'
      or 'ipfs ping'. The result after f74e71f9 is that we never shutdown
      cleanly, as we'll always os.Exit(0) from the interrupt handler.
      
      The os.Exit(0) itself is also dubious, as conceptually the interrupt
      handler should ask whatever is stalling to stop stalling, so that
      main() can return like normal. Exiting with -1 in error cases where
      the interrupt handler is unable to stop the stall is fine, but the
      normal case of interrupting cleanly should exit through main().
      61efc4de
    • Juan Batiz-Benet's avatar
      remove debugerrors · 140cd1fd
      Juan Batiz-Benet authored
      We now consider debugerrors harmful: we've run into cases where
      debugerror.Wrap() hid valuable error information (err == io.EOF?).
      I've removed them from the main code, but left them in some tests.
      Go errors are lacking, but unfortunately, this isn't the solution.
      
      It is possible that debugerros.New or debugerrors.Errorf should
      remain still (i.e. only remove debugerrors.Wrap) but we don't use
      these errors often enough to keep.
      140cd1fd
  11. 12 Apr, 2015 1 commit
  12. 07 Apr, 2015 1 commit
  13. 31 Mar, 2015 1 commit
  14. 14 Mar, 2015 1 commit
  15. 12 Mar, 2015 2 commits
  16. 09 Mar, 2015 2 commits
  17. 25 Feb, 2015 1 commit
    • Henry's avatar
      rewrote import paths of go.net/context to use golang.org/x/context · 92d08db7
      Henry authored
      - updated go-ctxgroup and goprocess
      ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
      - p2p/net/mock/mock_net.go
      - routing/dht/dht.go
      
      - updated context from hg repo to git
      prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
      represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo
      
      - updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)
      
      Aaron Jacobs (2):
      net/context: Don't accept a context in the DoSomethingSlow example.
      context: Be clear that users must cancel the result of WithCancel.
      
      Andrew Gerrand (1):
      go.net: use golang.org/x/... import paths
      
      Bryan C. Mills (1):
      net/context: Don't leak goroutines in Done example.
      
      Damien Neil (1):
      context: fix removal of cancelled timer contexts from parent
      
      David Symonds (2):
      context: Fix WithValue example code.
      net: add import comments.
      
      Sameer Ajmani (1):
      context: fix TestAllocs to account for ints in interfaces
      92d08db7
  18. 14 Feb, 2015 2 commits
  19. 10 Feb, 2015 1 commit
  20. 03 Feb, 2015 1 commit
  21. 02 Feb, 2015 5 commits
  22. 30 Jan, 2015 2 commits
  23. 25 Jan, 2015 1 commit
  24. 24 Jan, 2015 1 commit