fix max pool size guard
account for pending connections
Merge pull request #1 from vaxelfel/master

fix max pool size guard