Skip to content

Commit

Permalink
fix(connect): don't treat 'connect' as an error event
Browse files Browse the repository at this point in the history
Porting mongodb-js/mongodb-core#446 to the 'next' branch
  • Loading branch information
vkarpov15 authored and daprahamian committed Aug 13, 2019
1 parent c633eee commit 170a011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/connection/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function makeConnection(family, options, _callback) {
socket.setTimeout(connectionTimeout);
socket.setNoDelay(noDelay);

const errorEvents = ['error', 'close', 'timeout', 'parseError', 'connect'];
const errorEvents = ['error', 'close', 'timeout', 'parseError'];
function errorHandler(eventName) {
return err => {
errorEvents.forEach(event => socket.removeAllListeners(event));
Expand Down

0 comments on commit 170a011

Please sign in to comment.