{"action":"created","comment":{"url":"https://api.github.com/repos/baudehlo/Haraka/pulls/comments/40541288","id":40541288,"diff_hunk":"@@ -371,7 +373,7 @@ Connection.prototype._process_data = function() {\n                 this.logdebug('[early_talker] state=' + this.state + ' esmtp=' + this.esmtp + ' line=\"' + this_line + '\"');\n             }\n             this.early_talker = true;\n-            self._process_data();\n+            nextTick(self._process_data);","path":"connection.js","position":14,"original_position":14,"commit_id":"780e46ff8a56ba922e2ab36fcba7de11b9059376","original_commit_id":"780e46ff8a56ba922e2ab36fcba7de11b9059376","user":{"login":"smfreegard","id":550490,"avatar_url":"https://avatars.githubusercontent.com/u/550490?v=3","gravatar_id":"","url":"https://api.github.com/users/smfreegard","html_url":"https://github.com/smfreegard","followers_url":"https://api.github.com/users/smfreegard/followers","following_url":"https://api.github.com/users/smfreegard/following{/other_user}","gists_url":"https://api.github.com/users/smfreegard/gists{/gist_id}","starred_url":"https://api.github.com/users/smfreegard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smfreegard/subscriptions","organizations_url":"https://api.github.com/users/smfreegard/orgs","repos_url":"https://api.github.com/users/smfreegard/repos","events_url":"https://api.github.com/users/smfreegard/events{/privacy}","received_events_url":"https://api.github.com/users/smfreegard/received_events","type":"User","site_admin":false},"body":"Shouldn't these be closures?  e.g.\r\n\r\n`````\r\nnextTick(function () { self._process_data() });\r\n`````\r\n","created_at":"2015-09-28T11:19:22Z","updated_at":"2015-09-28T11:19:22Z","html_url":"https://github.com/baudehlo/Haraka/pull/1193#discussion_r40541288","pull_request_url":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193","_links":{"self":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/comments/40541288"},"html":{"href":"https://github.com/baudehlo/Haraka/pull/1193#discussion_r40541288"},"pull_request":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193"}}},"pull_request":{"url":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193","id":46142545,"html_url":"https://github.com/baudehlo/Haraka/pull/1193","diff_url":"https://github.com/baudehlo/Haraka/pull/1193.diff","patch_url":"https://github.com/baudehlo/Haraka/pull/1193.patch","issue_url":"https://api.github.com/repos/baudehlo/Haraka/issues/1193","number":1193,"state":"open","locked":false,"title":"Fix bug when client disconnect after sending data","user":{"login":"DarkSorrow","id":8224508,"avatar_url":"https://avatars.githubusercontent.com/u/8224508?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkSorrow","html_url":"https://github.com/DarkSorrow","followers_url":"https://api.github.com/users/DarkSorrow/followers","following_url":"https://api.github.com/users/DarkSorrow/following{/other_user}","gists_url":"https://api.github.com/users/DarkSorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkSorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkSorrow/subscriptions","organizations_url":"https://api.github.com/users/DarkSorrow/orgs","repos_url":"https://api.github.com/users/DarkSorrow/repos","events_url":"https://api.github.com/users/DarkSorrow/events{/privacy}","received_events_url":"https://api.github.com/users/DarkSorrow/received_events","type":"User","site_admin":false},"body":"Had a bug when someone connected, sent a message with \\r\\n and immediatly disconnected\r\n[INFO] [A317A8ED-2076-4E22-B4F6-925884DF9241] [core] HAProxy: proto=TCP4 src_ip=94.125.160.157:34982 dst_ip=149.202.52.64:587\r\n[CRIT] [-] [core] RangeError: Maximum call stack size exceeded\r\n[CRIT] [-] [core]     at new Uint8Array (native)\r\n[CRIT] [-] [core]     at Buffer.subarray (native)\r\n[CRIT] [-] [core]     at Buffer.slice (buffer.js:574:23)\r\n[CRIT] [-] [core]     at Connection._process_data (/data/src/Haraka/connection.js:357:43)\r\n[CRIT] [-] [core]     at Connection._process_data (/data/src/Haraka/connection.js:374:18)\r\n\r\nFixed the problem by applying what master smf said :o","created_at":"2015-09-28T10:44:48Z","updated_at":"2015-09-28T11:19:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e962fa1f4f3ef23d0b5e3cba3857379f0ac6b96a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193/commits","review_comments_url":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193/comments","review_comment_url":"https://api.github.com/repos/baudehlo/Haraka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baudehlo/Haraka/issues/1193/comments","statuses_url":"https://api.github.com/repos/baudehlo/Haraka/statuses/780e46ff8a56ba922e2ab36fcba7de11b9059376","head":{"label":"DarkSorrow:patch-5","ref":"patch-5","sha":"780e46ff8a56ba922e2ab36fcba7de11b9059376","user":{"login":"DarkSorrow","id":8224508,"avatar_url":"https://avatars.githubusercontent.com/u/8224508?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkSorrow","html_url":"https://github.com/DarkSorrow","followers_url":"https://api.github.com/users/DarkSorrow/followers","following_url":"https://api.github.com/users/DarkSorrow/following{/other_user}","gists_url":"https://api.github.com/users/DarkSorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkSorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkSorrow/subscriptions","organizations_url":"https://api.github.com/users/DarkSorrow/orgs","repos_url":"https://api.github.com/users/DarkSorrow/repos","events_url":"https://api.github.com/users/DarkSorrow/events{/privacy}","received_events_url":"https://api.github.com/users/DarkSorrow/received_events","type":"User","site_admin":false},"repo":{"id":34122097,"name":"Haraka","full_name":"DarkSorrow/Haraka","owner":{"login":"DarkSorrow","id":8224508,"avatar_url":"https://avatars.githubusercontent.com/u/8224508?v=3","gravatar_id":"","url":"https://api.github.com/users/DarkSorrow","html_url":"https://github.com/DarkSorrow","followers_url":"https://api.github.com/users/DarkSorrow/followers","following_url":"https://api.github.com/users/DarkSorrow/following{/other_user}","gists_url":"https://api.github.com/users/DarkSorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkSorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkSorrow/subscriptions","organizations_url":"https://api.github.com/users/DarkSorrow/orgs","repos_url":"https://api.github.com/users/DarkSorrow/repos","events_url":"https://api.github.com/users/DarkSorrow/events{/privacy}","received_events_url":"https://api.github.com/users/DarkSorrow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DarkSorrow/Haraka","description":"An event driven SMTP server","fork":true,"url":"https://api.github.com/repos/DarkSorrow/Haraka","forks_url":"https://api.github.com/repos/DarkSorrow/Haraka/forks","keys_url":"https://api.github.com/repos/DarkSorrow/Haraka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DarkSorrow/Haraka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DarkSorrow/Haraka/teams","hooks_url":"https://api.github.com/repos/DarkSorrow/Haraka/hooks","issue_events_url":"https://api.github.com/repos/DarkSorrow/Haraka/issues/events{/number}","events_url":"https://api.github.com/repos/DarkSorrow/Haraka/events","assignees_url":"https://api.github.com/repos/DarkSorrow/Haraka/assignees{/user}","branches_url":"https://api.github.com/repos/DarkSorrow/Haraka/branches{/branch}","tags_url":"https://api.github.com/repos/DarkSorrow/Haraka/tags","blobs_url":"https://api.github.com/repos/DarkSorrow/Haraka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DarkSorrow/Haraka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DarkSorrow/Haraka/git/refs{/sha}","trees_url":"https://api.github.com/repos/DarkSorrow/Haraka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DarkSorrow/Haraka/statuses/{sha}","languages_url":"https://api.github.com/repos/DarkSorrow/Haraka/languages","stargazers_url":"https://api.github.com/repos/DarkSorrow/Haraka/stargazers","contributors_url":"https://api.github.com/repos/DarkSorrow/Haraka/contributors","subscribers_url":"https://api.github.com/repos/DarkSorrow/Haraka/subscribers","subscription_url":"https://api.github.com/repos/DarkSorrow/Haraka/subscription","commits_url":"https://api.github.com/repos/DarkSorrow/Haraka/commits{/sha}","git_commits_url":"https://api.github.com/repos/DarkSorrow/Haraka/git/commits{/sha}","comments_url":"https://api.github.com/repos/DarkSorrow/Haraka/comments{/number}","issue_comment_url":"https://api.github.com/repos/DarkSorrow/Haraka/issues/comments{/number}","contents_url":"https://api.github.com/repos/DarkSorrow/Haraka/contents/{+path}","compare_url":"https://api.github.com/repos/DarkSorrow/Haraka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DarkSorrow/Haraka/merges","archive_url":"https://api.github.com/repos/DarkSorrow/Haraka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DarkSorrow/Haraka/downloads","issues_url":"https://api.github.com/repos/DarkSorrow/Haraka/issues{/number}","pulls_url":"https://api.github.com/repos/DarkSorrow/Haraka/pulls{/number}","milestones_url":"https://api.github.com/repos/DarkSorrow/Haraka/milestones{/number}","notifications_url":"https://api.github.com/repos/DarkSorrow/Haraka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DarkSorrow/Haraka/labels{/name}","releases_url":"https://api.github.com/repos/DarkSorrow/Haraka/releases{/id}","created_at":"2015-04-17T14:46:55Z","updated_at":"2015-04-17T14:46:56Z","pushed_at":"2015-09-28T10:42:47Z","git_url":"git://github.com/DarkSorrow/Haraka.git","ssh_url":"git@github.com:DarkSorrow/Haraka.git","clone_url":"https://github.com/DarkSorrow/Haraka.git","svn_url":"https://github.com/DarkSorrow/Haraka","homepage":"http://haraka.github.io/","size":3941,"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":"baudehlo:master","ref":"master","sha":"1801cdbccaf0a9fc40cd27910130e11b20143bc3","user":{"login":"baudehlo","id":662371,"avatar_url":"https://avatars.githubusercontent.com/u/662371?v=3","gravatar_id":"","url":"https://api.github.com/users/baudehlo","html_url":"https://github.com/baudehlo","followers_url":"https://api.github.com/users/baudehlo/followers","following_url":"https://api.github.com/users/baudehlo/following{/other_user}","gists_url":"https://api.github.com/users/baudehlo/gists{/gist_id}","starred_url":"https://api.github.com/users/baudehlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baudehlo/subscriptions","organizations_url":"https://api.github.com/users/baudehlo/orgs","repos_url":"https://api.github.com/users/baudehlo/repos","events_url":"https://api.github.com/users/baudehlo/events{/privacy}","received_events_url":"https://api.github.com/users/baudehlo/received_events","type":"User","site_admin":false},"repo":{"id":1464380,"name":"Haraka","full_name":"baudehlo/Haraka","owner":{"login":"baudehlo","id":662371,"avatar_url":"https://avatars.githubusercontent.com/u/662371?v=3","gravatar_id":"","url":"https://api.github.com/users/baudehlo","html_url":"https://github.com/baudehlo","followers_url":"https://api.github.com/users/baudehlo/followers","following_url":"https://api.github.com/users/baudehlo/following{/other_user}","gists_url":"https://api.github.com/users/baudehlo/gists{/gist_id}","starred_url":"https://api.github.com/users/baudehlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baudehlo/subscriptions","organizations_url":"https://api.github.com/users/baudehlo/orgs","repos_url":"https://api.github.com/users/baudehlo/repos","events_url":"https://api.github.com/users/baudehlo/events{/privacy}","received_events_url":"https://api.github.com/users/baudehlo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/baudehlo/Haraka","description":"An event driven SMTP server","fork":false,"url":"https://api.github.com/repos/baudehlo/Haraka","forks_url":"https://api.github.com/repos/baudehlo/Haraka/forks","keys_url":"https://api.github.com/repos/baudehlo/Haraka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baudehlo/Haraka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baudehlo/Haraka/teams","hooks_url":"https://api.github.com/repos/baudehlo/Haraka/hooks","issue_events_url":"https://api.github.com/repos/baudehlo/Haraka/issues/events{/number}","events_url":"https://api.github.com/repos/baudehlo/Haraka/events","assignees_url":"https://api.github.com/repos/baudehlo/Haraka/assignees{/user}","branches_url":"https://api.github.com/repos/baudehlo/Haraka/branches{/branch}","tags_url":"https://api.github.com/repos/baudehlo/Haraka/tags","blobs_url":"https://api.github.com/repos/baudehlo/Haraka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baudehlo/Haraka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baudehlo/Haraka/git/refs{/sha}","trees_url":"https://api.github.com/repos/baudehlo/Haraka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baudehlo/Haraka/statuses/{sha}","languages_url":"https://api.github.com/repos/baudehlo/Haraka/languages","stargazers_url":"https://api.github.com/repos/baudehlo/Haraka/stargazers","contributors_url":"https://api.github.com/repos/baudehlo/Haraka/contributors","subscribers_url":"https://api.github.com/repos/baudehlo/Haraka/subscribers","subscription_url":"https://api.github.com/repos/baudehlo/Haraka/subscription","commits_url":"https://api.github.com/repos/baudehlo/Haraka/commits{/sha}","git_commits_url":"https://api.github.com/repos/baudehlo/Haraka/git/commits{/sha}","comments_url":"https://api.github.com/repos/baudehlo/Haraka/comments{/number}","issue_comment_url":"https://api.github.com/repos/baudehlo/Haraka/issues/comments{/number}","contents_url":"https://api.github.com/repos/baudehlo/Haraka/contents/{+path}","compare_url":"https://api.github.com/repos/baudehlo/Haraka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baudehlo/Haraka/merges","archive_url":"https://api.github.com/repos/baudehlo/Haraka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baudehlo/Haraka/downloads","issues_url":"https://api.github.com/repos/baudehlo/Haraka/issues{/number}","pulls_url":"https://api.github.com/repos/baudehlo/Haraka/pulls{/number}","milestones_url":"https://api.github.com/repos/baudehlo/Haraka/milestones{/number}","notifications_url":"https://api.github.com/repos/baudehlo/Haraka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baudehlo/Haraka/labels{/name}","releases_url":"https://api.github.com/repos/baudehlo/Haraka/releases{/id}","created_at":"2011-03-10T17:00:20Z","updated_at":"2015-09-25T06:16:58Z","pushed_at":"2015-09-28T10:44:48Z","git_url":"git://github.com/baudehlo/Haraka.git","ssh_url":"git@github.com:baudehlo/Haraka.git","clone_url":"https://github.com/baudehlo/Haraka.git","svn_url":"https://github.com/baudehlo/Haraka","homepage":"http://haraka.github.io/","size":10922,"stargazers_count":1911,"watchers_count":1911,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":242,"mirror_url":null,"open_issues_count":43,"forks":242,"open_issues":43,"watchers":1911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193"},"html":{"href":"https://github.com/baudehlo/Haraka/pull/1193"},"issue":{"href":"https://api.github.com/repos/baudehlo/Haraka/issues/1193"},"comments":{"href":"https://api.github.com/repos/baudehlo/Haraka/issues/1193/comments"},"review_comments":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193/comments"},"review_comment":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baudehlo/Haraka/pulls/1193/commits"},"statuses":{"href":"https://api.github.com/repos/baudehlo/Haraka/statuses/780e46ff8a56ba922e2ab36fcba7de11b9059376"}}}}