Update lib/client.js

Fix hang when connection drops after submitting query