不要怂,就是干,撸起袖子干!

  1. 29 Dec, 2013 1 commit
  2. 28 Dec, 2013 10 commits
  3. 27 Dec, 2013 2 commits
  4. 20 Dec, 2013 8 commits
  5. 19 Dec, 2013 17 commits
  6. 18 Dec, 2013 2 commits
    • Closing postgres client properly · 95fbc6fa
      This fixes a couple issues:
      
      * Multiple decrements of `pendingQueries` for the same query. Since we
        have a `complete` handler in addition to `success` and `error`,
        `endQuery` gets called twice if it's a success or an error. This
        means that we will end up with `pendingQueries < 0` so the
        disconnect condition is never satisfied.
      * We were hooking into pg's `drain` event during the disconnect step,
        this is already too late since most of the time, the drain event is
        already fired. We need to hook into the `drain` event on client
        creation. Sadly, we cannot close the connection on the `drain`
        event as it will break with the error,
        `Error: Stream unexpectedly ended during query execution`
      Anh-Kiet Ngo committed