Update lib/connection.js