Fixes #127 - socket is closed issue with pools

This is the way I've found so far to fix the issue.


thanks