Merge pull request #2 from jinntrance/pool-fix

Pool fix
Merge pull request #1 from jinntrance/master

avoid unnecessary clients and close broken connections
Merge pull request #1 from mijia/master

switch base