{"action":"created","comment":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/comments/77765559","id":77765559,"diff_hunk":"@@ -525,7 +531,17 @@ NetHandler::mainNetEvent(int event, Event *e)\n       close_UnixNetVConnection(vc, trigger_event->ethread);\n     else if (vc->read.enabled && vc->read.triggered)\n       vc->net_read_io(this, trigger_event->ethread);\n-    else if (!vc->read.enabled) {\n+    else if (vc->read.error) {\n+      int err = 0, errlen = sizeof(int);\n+      if (getsockopt(vc->con.fd, SOL_SOCKET, SO_ERROR, &err, (socklen_t *)&errlen) == -1) {\n+        err = errno;\n+      }\n+      if (err != EAGAIN && err != EINTR) {\n+        vc->readSignalError(this, err);","path":"iocore/net/UnixNet.cc","position":31,"original_position":31,"commit_id":"84934a8d2ba9933e59e03326817cf708783d70cf","original_commit_id":"84934a8d2ba9933e59e03326817cf708783d70cf","user":{"login":"oknet","id":5242289,"avatar_url":"https://avatars.githubusercontent.com/u/5242289?v=3","gravatar_id":"","url":"https://api.github.com/users/oknet","html_url":"https://github.com/oknet","followers_url":"https://api.github.com/users/oknet/followers","following_url":"https://api.github.com/users/oknet/following{/other_user}","gists_url":"https://api.github.com/users/oknet/gists{/gist_id}","starred_url":"https://api.github.com/users/oknet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oknet/subscriptions","organizations_url":"https://api.github.com/users/oknet/orgs","repos_url":"https://api.github.com/users/oknet/repos","events_url":"https://api.github.com/users/oknet/events{/privacy}","received_events_url":"https://api.github.com/users/oknet/received_events","type":"User","site_admin":false},"body":"```\r\nstatic void\r\nread_from_net(NetHandler *nh, UnixNetVConnection *vc, EThread *thread)\r\n{\r\n...\r\n  if (vc->closed) {\r\n    close_UnixNetVConnection(vc, thread);\r\n    return;\r\n  }\r\n+  // if it is not triggered and got error from polling\r\n+  if (!s->triggered && s->error) {\r\n+    int err = 0, errlen = sizeof(int);\r\n+    if (getsockopt(vc->con.fd, SOL_SOCKET, SO_ERROR, &err, (socklen_t *)&errlen) == -1) {\r\n+      err = errno;\r\n+    }\r\n+    if (err != EAGAIN && err != EINTR) {\r\n+      read_signal_error(this, vc, err);\r\n+    }\r\n+    return;\r\n+  }\r\n  // if it is not enabled.\r\n  if (!s->enabled || s->vio.op != VIO::READ) {\r\n    read_disable(nh, vc);\r\n    return;\r\n  }\r\n...\r\n}\r\n```","created_at":"2016-09-07T06:22:47Z","updated_at":"2016-09-07T06:22:47Z","html_url":"https://github.com/apache/trafficserver/pull/947#discussion_r77765559","pull_request_url":"https://api.github.com/repos/apache/trafficserver/pulls/947","_links":{"self":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/comments/77765559"},"html":{"href":"https://github.com/apache/trafficserver/pull/947#discussion_r77765559"},"pull_request":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/947"}}},"pull_request":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/947","id":83519694,"html_url":"https://github.com/apache/trafficserver/pull/947","diff_url":"https://github.com/apache/trafficserver/pull/947.diff","patch_url":"https://github.com/apache/trafficserver/pull/947.patch","issue_url":"https://api.github.com/repos/apache/trafficserver/issues/947","number":947,"state":"open","locked":false,"title":"TS-4796 Change UnixNetHandler to always bubble up epoll errors to the VConnection","user":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"body":"Before if the vcon wasn't read or write enabled errors would be swallowed. This leads to a variety of issues where the socket errors aren't dealt with immediately.","created_at":"2016-08-31T20:05:56Z","updated_at":"2016-09-07T06:22:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a8534e9fad7ad001cc8c311c8d34da04769266f","assignee":{"login":"shinrich","id":334488,"avatar_url":"https://avatars.githubusercontent.com/u/334488?v=3","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false},"assignees":[{"login":"shinrich","id":334488,"avatar_url":"https://avatars.githubusercontent.com/u/334488?v=3","gravatar_id":"","url":"https://api.github.com/users/shinrich","html_url":"https://github.com/shinrich","followers_url":"https://api.github.com/users/shinrich/followers","following_url":"https://api.github.com/users/shinrich/following{/other_user}","gists_url":"https://api.github.com/users/shinrich/gists{/gist_id}","starred_url":"https://api.github.com/users/shinrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinrich/subscriptions","organizations_url":"https://api.github.com/users/shinrich/orgs","repos_url":"https://api.github.com/users/shinrich/repos","events_url":"https://api.github.com/users/shinrich/events{/privacy}","received_events_url":"https://api.github.com/users/shinrich/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/apache/trafficserver/milestones/1","html_url":"https://github.com/apache/trafficserver/milestones/7.0.0","labels_url":"https://api.github.com/repos/apache/trafficserver/milestones/1/labels","id":1751566,"number":1,"title":"7.0.0","description":"","creator":{"login":"zwoop","id":202131,"avatar_url":"https://avatars.githubusercontent.com/u/202131?v=3","gravatar_id":"","url":"https://api.github.com/users/zwoop","html_url":"https://github.com/zwoop","followers_url":"https://api.github.com/users/zwoop/followers","following_url":"https://api.github.com/users/zwoop/following{/other_user}","gists_url":"https://api.github.com/users/zwoop/gists{/gist_id}","starred_url":"https://api.github.com/users/zwoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zwoop/subscriptions","organizations_url":"https://api.github.com/users/zwoop/orgs","repos_url":"https://api.github.com/users/zwoop/repos","events_url":"https://api.github.com/users/zwoop/events{/privacy}","received_events_url":"https://api.github.com/users/zwoop/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":240,"state":"open","created_at":"2016-05-06T14:28:01Z","updated_at":"2016-09-06T19:16:17Z","due_on":"2016-10-15T06:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/apache/trafficserver/pulls/947/commits","review_comments_url":"https://api.github.com/repos/apache/trafficserver/pulls/947/comments","review_comment_url":"https://api.github.com/repos/apache/trafficserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/947/comments","statuses_url":"https://api.github.com/repos/apache/trafficserver/statuses/84934a8d2ba9933e59e03326817cf708783d70cf","head":{"label":"jacksontj:TS-4796","ref":"TS-4796","sha":"84934a8d2ba9933e59e03326817cf708783d70cf","user":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"repo":{"id":14320413,"name":"trafficserver","full_name":"jacksontj/trafficserver","owner":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacksontj/trafficserver","description":"Mirror of Apache Traffic Server","fork":true,"url":"https://api.github.com/repos/jacksontj/trafficserver","forks_url":"https://api.github.com/repos/jacksontj/trafficserver/forks","keys_url":"https://api.github.com/repos/jacksontj/trafficserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacksontj/trafficserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacksontj/trafficserver/teams","hooks_url":"https://api.github.com/repos/jacksontj/trafficserver/hooks","issue_events_url":"https://api.github.com/repos/jacksontj/trafficserver/issues/events{/number}","events_url":"https://api.github.com/repos/jacksontj/trafficserver/events","assignees_url":"https://api.github.com/repos/jacksontj/trafficserver/assignees{/user}","branches_url":"https://api.github.com/repos/jacksontj/trafficserver/branches{/branch}","tags_url":"https://api.github.com/repos/jacksontj/trafficserver/tags","blobs_url":"https://api.github.com/repos/jacksontj/trafficserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacksontj/trafficserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacksontj/trafficserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacksontj/trafficserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacksontj/trafficserver/statuses/{sha}","languages_url":"https://api.github.com/repos/jacksontj/trafficserver/languages","stargazers_url":"https://api.github.com/repos/jacksontj/trafficserver/stargazers","contributors_url":"https://api.github.com/repos/jacksontj/trafficserver/contributors","subscribers_url":"https://api.github.com/repos/jacksontj/trafficserver/subscribers","subscription_url":"https://api.github.com/repos/jacksontj/trafficserver/subscription","commits_url":"https://api.github.com/repos/jacksontj/trafficserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacksontj/trafficserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacksontj/trafficserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacksontj/trafficserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacksontj/trafficserver/contents/{+path}","compare_url":"https://api.github.com/repos/jacksontj/trafficserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacksontj/trafficserver/merges","archive_url":"https://api.github.com/repos/jacksontj/trafficserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacksontj/trafficserver/downloads","issues_url":"https://api.github.com/repos/jacksontj/trafficserver/issues{/number}","pulls_url":"https://api.github.com/repos/jacksontj/trafficserver/pulls{/number}","milestones_url":"https://api.github.com/repos/jacksontj/trafficserver/milestones{/number}","notifications_url":"https://api.github.com/repos/jacksontj/trafficserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacksontj/trafficserver/labels{/name}","releases_url":"https://api.github.com/repos/jacksontj/trafficserver/releases{/id}","deployments_url":"https://api.github.com/repos/jacksontj/trafficserver/deployments","created_at":"2013-11-12T02:49:24Z","updated_at":"2015-05-01T02:49:11Z","pushed_at":"2016-09-06T19:04:20Z","git_url":"git://github.com/jacksontj/trafficserver.git","ssh_url":"git@github.com:jacksontj/trafficserver.git","clone_url":"https://github.com/jacksontj/trafficserver.git","svn_url":"https://github.com/jacksontj/trafficserver","homepage":null,"size":56775,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"b5bf7c9344a308e496ad502bb6cbd5e7458f1ead","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":356066,"name":"trafficserver","full_name":"apache/trafficserver","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/trafficserver","description":"Mirror of Apache Traffic Server","fork":false,"url":"https://api.github.com/repos/apache/trafficserver","forks_url":"https://api.github.com/repos/apache/trafficserver/forks","keys_url":"https://api.github.com/repos/apache/trafficserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/trafficserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/trafficserver/teams","hooks_url":"https://api.github.com/repos/apache/trafficserver/hooks","issue_events_url":"https://api.github.com/repos/apache/trafficserver/issues/events{/number}","events_url":"https://api.github.com/repos/apache/trafficserver/events","assignees_url":"https://api.github.com/repos/apache/trafficserver/assignees{/user}","branches_url":"https://api.github.com/repos/apache/trafficserver/branches{/branch}","tags_url":"https://api.github.com/repos/apache/trafficserver/tags","blobs_url":"https://api.github.com/repos/apache/trafficserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/trafficserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/trafficserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/trafficserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/trafficserver/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/trafficserver/languages","stargazers_url":"https://api.github.com/repos/apache/trafficserver/stargazers","contributors_url":"https://api.github.com/repos/apache/trafficserver/contributors","subscribers_url":"https://api.github.com/repos/apache/trafficserver/subscribers","subscription_url":"https://api.github.com/repos/apache/trafficserver/subscription","commits_url":"https://api.github.com/repos/apache/trafficserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/trafficserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/trafficserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/trafficserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/trafficserver/contents/{+path}","compare_url":"https://api.github.com/repos/apache/trafficserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/trafficserver/merges","archive_url":"https://api.github.com/repos/apache/trafficserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/trafficserver/downloads","issues_url":"https://api.github.com/repos/apache/trafficserver/issues{/number}","pulls_url":"https://api.github.com/repos/apache/trafficserver/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/trafficserver/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/trafficserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/trafficserver/labels{/name}","releases_url":"https://api.github.com/repos/apache/trafficserver/releases{/id}","deployments_url":"https://api.github.com/repos/apache/trafficserver/deployments","created_at":"2009-10-31T08:00:10Z","updated_at":"2016-09-05T14:44:24Z","pushed_at":"2016-09-07T03:50:49Z","git_url":"git://github.com/apache/trafficserver.git","ssh_url":"git@github.com:apache/trafficserver.git","clone_url":"https://github.com/apache/trafficserver.git","svn_url":"https://github.com/apache/trafficserver","homepage":null,"size":68382,"stargazers_count":458,"watchers_count":458,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":365,"mirror_url":null,"open_issues_count":58,"forks":365,"open_issues":58,"watchers":458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/947"},"html":{"href":"https://github.com/apache/trafficserver/pull/947"},"issue":{"href":"https://api.github.com/repos/apache/trafficserver/issues/947"},"comments":{"href":"https://api.github.com/repos/apache/trafficserver/issues/947/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/947/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/trafficserver/pulls/947/commits"},"statuses":{"href":"https://api.github.com/repos/apache/trafficserver/statuses/84934a8d2ba9933e59e03326817cf708783d70cf"}}}}
{"actor":{"display_login":"oknet"}}