1. 21 May, 2015 1 commit
  2. 18 May, 2015 1 commit
  3. 02 May, 2015 1 commit
  4. 20 Apr, 2015 3 commits
    • Tor Arne Vestbø's avatar
      corehttp: disable HTTP keep-alive when shutting down server · 6fe85496
      Tor Arne Vestbø authored
      Once the server is asked to shut down, we stop accepting new
      connections, but the 'manners' graceful shutdown will wait for
      all existing connections closed to close before finishing.
      
      For keep-alive connections this will never happen unless the
      client detects that the server is shutting down through the
      ipfs API itself, and closes the connection in response.
      
      This is a problem e.g. with the webui's connections visualization,
      which polls the swarm/peers endpoint once a second, and never
      detects that the API server was shut down.
      
      We can mitigate this by telling the server to disable keep-alive,
      which will add a 'Connection: close' header to the next HTTP
      response on the connection. A well behaving client should then
      treat that correspondingly by closing the connection.
      
      Unfortunately this doesn't happen immediately in all cases,
      presumably depending on the keep-alive timeout of the browser
      that set up the connection, but it's at least a step in the
      right direction.
      6fe85496
    • Tor Arne Vestbø's avatar
      corehttp: ensure node closing/teardown waits for server termination · c9d30849
      Tor Arne Vestbø authored
      When closing a node, the node itself only takes care of tearing down
      its own children. As corehttp sets up a server based on a node, it
      needs to also ensure that the server is accounted for when determining
      if the node has been fully closed.
      c9d30849
    • Tor Arne Vestbø's avatar
      corehttp: log when server takes a long time to shut down · cc830ff2
      Tor Arne Vestbø authored
      The server may stay alive for quite a while due to waiting on
      open connections to close before shutting down. We should
      find ways to terminate these connections in a more controlled
      manner, but in the meantime it's helpful to be able to see
      why a shutdown of the ipfs daemon is taking so long.
      cc830ff2
  5. 31 Mar, 2015 1 commit
  6. 08 Feb, 2015 2 commits
  7. 01 Feb, 2015 1 commit
    • Juan Batiz-Benet's avatar
      test/sharness: fix errors · f1d34a2a
      Juan Batiz-Benet authored
      - core: daemon stdout print to cmd + daemon init checks
      - core: fixed bug where the gateway was printed as "API"
      - sharness/test-lib: daemon init checks
      - sharness/test-lib: portable TCP port check
      - sharness/init: fix test bits output
      - sharness: use common hashes in one place.
      - move t0100-http-gateway -> t0111-gateway-writable
      - sharness: test-lib funcs for gateway config
      - sharness/t0111-gateway-writable: use sh funcs
      - sharness/t0111-gateway-writable: fixes
        - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
        - use $FILEPATH, not $path
        - last test seems to fail
      f1d34a2a
  8. 24 Jan, 2015 1 commit
  9. 22 Jan, 2015 2 commits
    • Brian Tiger Chow's avatar
      separate concerns · fadede6c
      Brian Tiger Chow authored
      fadede6c
    • Brian Tiger Chow's avatar
      refactor(core) extract corehttp package · fadedf9e
      Brian Tiger Chow authored
      PACKAGE DOCUMENTATION
      
      package corehttp
      
          FUNCTIONS
      
          func GatewayOption(n *core.IpfsNode, mux *http.ServeMux) error
      
          func ListenAndServe(n *core.IpfsNode, addr ma.Multiaddr, options
          ...ServeOption) error
      
          func WebUIOption(n *core.IpfsNode, mux *http.ServeMux) error
      
          TYPES
      
          type ServeOption func(*core.IpfsNode, *http.ServeMux) error
      
          func DaemonOption(cctx commands.Context) ServeOption
      fadedf9e