{"action":"opened","number":405,"pull_request":{"url":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405","id":94873904,"html_url":"https://github.com/mcavage/node-ldapjs/pull/405","diff_url":"https://github.com/mcavage/node-ldapjs/pull/405.diff","patch_url":"https://github.com/mcavage/node-ldapjs/pull/405.patch","issue_url":"https://api.github.com/repos/mcavage/node-ldapjs/issues/405","number":405,"state":"open","locked":false,"title":"destroy socket if auto-bind fails","user":{"login":"pbatey","id":4576901,"avatar_url":"https://avatars.githubusercontent.com/u/4576901?v=3","gravatar_id":"","url":"https://api.github.com/users/pbatey","html_url":"https://github.com/pbatey","followers_url":"https://api.github.com/users/pbatey/followers","following_url":"https://api.github.com/users/pbatey/following{/other_user}","gists_url":"https://api.github.com/users/pbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/pbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbatey/subscriptions","organizations_url":"https://api.github.com/users/pbatey/orgs","repos_url":"https://api.github.com/users/pbatey/repos","events_url":"https://api.github.com/users/pbatey/events{/privacy}","received_events_url":"https://api.github.com/users/pbatey/received_events","type":"User","site_admin":false},"body":"With a client, when using bindDN and bindCredentials, if the credentials are bad the bind fails as expected, but the socket is left open. An explicit call to `client.destroy()` is required in order to release the socket. This is confusing since the socket would be closed after a successful operation. Closing the socket upon bind failure makes it consistent.\r\n\r\nAlso, the bind error was being reported twice. Once as an emit, and again in the callback. Because a bind failure ends with the callback being executed, an emit doesn't make sense.\r\n\r\nThe test that applies to this behavior is *auto-bind bad credentials* in `test/client.test.js` -- it continues to pass with the changes I've made, but because it calls `clt.destroy()` explicitly, it doesn't replicate the problems I was having.","created_at":"2016-11-22T18:44:09Z","updated_at":"2016-11-22T18:44:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3c632410fd1f9b22c6a0ab55139acd4cac7bd0e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405/commits","review_comments_url":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405/comments","review_comment_url":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mcavage/node-ldapjs/issues/405/comments","statuses_url":"https://api.github.com/repos/mcavage/node-ldapjs/statuses/6fc1e4be66fe80bfc81e138c471bea8998678676","head":{"label":"pbatey:master","ref":"master","sha":"6fc1e4be66fe80bfc81e138c471bea8998678676","user":{"login":"pbatey","id":4576901,"avatar_url":"https://avatars.githubusercontent.com/u/4576901?v=3","gravatar_id":"","url":"https://api.github.com/users/pbatey","html_url":"https://github.com/pbatey","followers_url":"https://api.github.com/users/pbatey/followers","following_url":"https://api.github.com/users/pbatey/following{/other_user}","gists_url":"https://api.github.com/users/pbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/pbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbatey/subscriptions","organizations_url":"https://api.github.com/users/pbatey/orgs","repos_url":"https://api.github.com/users/pbatey/repos","events_url":"https://api.github.com/users/pbatey/events{/privacy}","received_events_url":"https://api.github.com/users/pbatey/received_events","type":"User","site_admin":false},"repo":{"id":74501374,"name":"node-ldapjs","full_name":"pbatey/node-ldapjs","owner":{"login":"pbatey","id":4576901,"avatar_url":"https://avatars.githubusercontent.com/u/4576901?v=3","gravatar_id":"","url":"https://api.github.com/users/pbatey","html_url":"https://github.com/pbatey","followers_url":"https://api.github.com/users/pbatey/followers","following_url":"https://api.github.com/users/pbatey/following{/other_user}","gists_url":"https://api.github.com/users/pbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/pbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbatey/subscriptions","organizations_url":"https://api.github.com/users/pbatey/orgs","repos_url":"https://api.github.com/users/pbatey/repos","events_url":"https://api.github.com/users/pbatey/events{/privacy}","received_events_url":"https://api.github.com/users/pbatey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pbatey/node-ldapjs","description":"LDAP Client and Server API for node.js","fork":true,"url":"https://api.github.com/repos/pbatey/node-ldapjs","forks_url":"https://api.github.com/repos/pbatey/node-ldapjs/forks","keys_url":"https://api.github.com/repos/pbatey/node-ldapjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pbatey/node-ldapjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pbatey/node-ldapjs/teams","hooks_url":"https://api.github.com/repos/pbatey/node-ldapjs/hooks","issue_events_url":"https://api.github.com/repos/pbatey/node-ldapjs/issues/events{/number}","events_url":"https://api.github.com/repos/pbatey/node-ldapjs/events","assignees_url":"https://api.github.com/repos/pbatey/node-ldapjs/assignees{/user}","branches_url":"https://api.github.com/repos/pbatey/node-ldapjs/branches{/branch}","tags_url":"https://api.github.com/repos/pbatey/node-ldapjs/tags","blobs_url":"https://api.github.com/repos/pbatey/node-ldapjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pbatey/node-ldapjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pbatey/node-ldapjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pbatey/node-ldapjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pbatey/node-ldapjs/statuses/{sha}","languages_url":"https://api.github.com/repos/pbatey/node-ldapjs/languages","stargazers_url":"https://api.github.com/repos/pbatey/node-ldapjs/stargazers","contributors_url":"https://api.github.com/repos/pbatey/node-ldapjs/contributors","subscribers_url":"https://api.github.com/repos/pbatey/node-ldapjs/subscribers","subscription_url":"https://api.github.com/repos/pbatey/node-ldapjs/subscription","commits_url":"https://api.github.com/repos/pbatey/node-ldapjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pbatey/node-ldapjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pbatey/node-ldapjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pbatey/node-ldapjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pbatey/node-ldapjs/contents/{+path}","compare_url":"https://api.github.com/repos/pbatey/node-ldapjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pbatey/node-ldapjs/merges","archive_url":"https://api.github.com/repos/pbatey/node-ldapjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pbatey/node-ldapjs/downloads","issues_url":"https://api.github.com/repos/pbatey/node-ldapjs/issues{/number}","pulls_url":"https://api.github.com/repos/pbatey/node-ldapjs/pulls{/number}","milestones_url":"https://api.github.com/repos/pbatey/node-ldapjs/milestones{/number}","notifications_url":"https://api.github.com/repos/pbatey/node-ldapjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pbatey/node-ldapjs/labels{/name}","releases_url":"https://api.github.com/repos/pbatey/node-ldapjs/releases{/id}","deployments_url":"https://api.github.com/repos/pbatey/node-ldapjs/deployments","created_at":"2016-11-22T18:23:11Z","updated_at":"2016-11-22T18:23:13Z","pushed_at":"2016-11-22T18:23:46Z","git_url":"git://github.com/pbatey/node-ldapjs.git","ssh_url":"git@github.com:pbatey/node-ldapjs.git","clone_url":"https://github.com/pbatey/node-ldapjs.git","svn_url":"https://github.com/pbatey/node-ldapjs","homepage":"http://ldapjs.org","size":1902,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mcavage:master","ref":"master","sha":"988467911cbbfdbefdf6015eb036489dd684370b","user":{"login":"mcavage","id":365262,"avatar_url":"https://avatars.githubusercontent.com/u/365262?v=3","gravatar_id":"","url":"https://api.github.com/users/mcavage","html_url":"https://github.com/mcavage","followers_url":"https://api.github.com/users/mcavage/followers","following_url":"https://api.github.com/users/mcavage/following{/other_user}","gists_url":"https://api.github.com/users/mcavage/gists{/gist_id}","starred_url":"https://api.github.com/users/mcavage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcavage/subscriptions","organizations_url":"https://api.github.com/users/mcavage/orgs","repos_url":"https://api.github.com/users/mcavage/repos","events_url":"https://api.github.com/users/mcavage/events{/privacy}","received_events_url":"https://api.github.com/users/mcavage/received_events","type":"User","site_admin":false},"repo":{"id":2156920,"name":"node-ldapjs","full_name":"mcavage/node-ldapjs","owner":{"login":"mcavage","id":365262,"avatar_url":"https://avatars.githubusercontent.com/u/365262?v=3","gravatar_id":"","url":"https://api.github.com/users/mcavage","html_url":"https://github.com/mcavage","followers_url":"https://api.github.com/users/mcavage/followers","following_url":"https://api.github.com/users/mcavage/following{/other_user}","gists_url":"https://api.github.com/users/mcavage/gists{/gist_id}","starred_url":"https://api.github.com/users/mcavage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcavage/subscriptions","organizations_url":"https://api.github.com/users/mcavage/orgs","repos_url":"https://api.github.com/users/mcavage/repos","events_url":"https://api.github.com/users/mcavage/events{/privacy}","received_events_url":"https://api.github.com/users/mcavage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcavage/node-ldapjs","description":"LDAP Client and Server API for node.js","fork":false,"url":"https://api.github.com/repos/mcavage/node-ldapjs","forks_url":"https://api.github.com/repos/mcavage/node-ldapjs/forks","keys_url":"https://api.github.com/repos/mcavage/node-ldapjs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcavage/node-ldapjs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcavage/node-ldapjs/teams","hooks_url":"https://api.github.com/repos/mcavage/node-ldapjs/hooks","issue_events_url":"https://api.github.com/repos/mcavage/node-ldapjs/issues/events{/number}","events_url":"https://api.github.com/repos/mcavage/node-ldapjs/events","assignees_url":"https://api.github.com/repos/mcavage/node-ldapjs/assignees{/user}","branches_url":"https://api.github.com/repos/mcavage/node-ldapjs/branches{/branch}","tags_url":"https://api.github.com/repos/mcavage/node-ldapjs/tags","blobs_url":"https://api.github.com/repos/mcavage/node-ldapjs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcavage/node-ldapjs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcavage/node-ldapjs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcavage/node-ldapjs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcavage/node-ldapjs/statuses/{sha}","languages_url":"https://api.github.com/repos/mcavage/node-ldapjs/languages","stargazers_url":"https://api.github.com/repos/mcavage/node-ldapjs/stargazers","contributors_url":"https://api.github.com/repos/mcavage/node-ldapjs/contributors","subscribers_url":"https://api.github.com/repos/mcavage/node-ldapjs/subscribers","subscription_url":"https://api.github.com/repos/mcavage/node-ldapjs/subscription","commits_url":"https://api.github.com/repos/mcavage/node-ldapjs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcavage/node-ldapjs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcavage/node-ldapjs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcavage/node-ldapjs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcavage/node-ldapjs/contents/{+path}","compare_url":"https://api.github.com/repos/mcavage/node-ldapjs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcavage/node-ldapjs/merges","archive_url":"https://api.github.com/repos/mcavage/node-ldapjs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcavage/node-ldapjs/downloads","issues_url":"https://api.github.com/repos/mcavage/node-ldapjs/issues{/number}","pulls_url":"https://api.github.com/repos/mcavage/node-ldapjs/pulls{/number}","milestones_url":"https://api.github.com/repos/mcavage/node-ldapjs/milestones{/number}","notifications_url":"https://api.github.com/repos/mcavage/node-ldapjs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcavage/node-ldapjs/labels{/name}","releases_url":"https://api.github.com/repos/mcavage/node-ldapjs/releases{/id}","deployments_url":"https://api.github.com/repos/mcavage/node-ldapjs/deployments","created_at":"2011-08-04T20:37:11Z","updated_at":"2016-11-22T13:26:15Z","pushed_at":"2016-11-22T18:44:09Z","git_url":"git://github.com/mcavage/node-ldapjs.git","ssh_url":"git@github.com:mcavage/node-ldapjs.git","clone_url":"https://github.com/mcavage/node-ldapjs.git","svn_url":"https://github.com/mcavage/node-ldapjs","homepage":"http://ldapjs.org","size":1902,"stargazers_count":797,"watchers_count":797,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":169,"mirror_url":null,"open_issues_count":70,"forks":169,"open_issues":70,"watchers":797,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405"},"html":{"href":"https://github.com/mcavage/node-ldapjs/pull/405"},"issue":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/issues/405"},"comments":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/issues/405/comments"},"review_comments":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405/comments"},"review_comment":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/pulls/405/commits"},"statuses":{"href":"https://api.github.com/repos/mcavage/node-ldapjs/statuses/6fc1e4be66fe80bfc81e138c471bea8998678676"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"pbatey"}}