{"action":"created","comment":{"url":"https://api.github.com/repos/martinisgroup/servers/pulls/comments/34074064","id":34074064,"diff_hunk":"@@ -58,26 +59,84 @@ class EthernetBus(\n   private lazy val listenThread = {\n     val thread = new Thread {\n       override def run(): Unit = {\n-        try {\n-          pcap.loop(-1, packetListener)\n-          pcap.close()\n-        } catch {\n-          case e: Exception =>\n-            // should never get here\n-            e.printStackTrace()\n-            throw e\n+        var alive = true\n+        while (alive) {\n+          val pcap = reopen()\n+          try {\n+            pcap.loop(-1, packetListener)","path":"DirectEthernet/src/main/scala/org/labrad/ethernet/server/EthernetBus.scala","position":53,"original_position":53,"commit_id":"aa133097f38aa998b0d0c32f74ed2765d0c46751","original_commit_id":"aa133097f38aa998b0d0c32f74ed2765d0c46751","user":{"login":"DanielSank","id":4584456,"avatar_url":"https://avatars.githubusercontent.com/u/4584456?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielSank","html_url":"https://github.com/DanielSank","followers_url":"https://api.github.com/users/DanielSank/followers","following_url":"https://api.github.com/users/DanielSank/following{/other_user}","gists_url":"https://api.github.com/users/DanielSank/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielSank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielSank/subscriptions","organizations_url":"https://api.github.com/users/DanielSank/orgs","repos_url":"https://api.github.com/users/DanielSank/repos","events_url":"https://api.github.com/users/DanielSank/events{/privacy}","received_events_url":"https://api.github.com/users/DanielSank/received_events","type":"User","site_admin":false},"body":"What does this line do?","created_at":"2015-07-07T18:34:52Z","updated_at":"2015-07-07T18:34:52Z","html_url":"https://github.com/martinisgroup/servers/pull/186#discussion_r34074064","pull_request_url":"https://api.github.com/repos/martinisgroup/servers/pulls/186","_links":{"self":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/comments/34074064"},"html":{"href":"https://github.com/martinisgroup/servers/pull/186#discussion_r34074064"},"pull_request":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/martinisgroup/servers/pulls/186","id":37209680,"html_url":"https://github.com/martinisgroup/servers/pull/186","diff_url":"https://github.com/martinisgroup/servers/pull/186.diff","patch_url":"https://github.com/martinisgroup/servers/pull/186.patch","issue_url":"https://api.github.com/repos/martinisgroup/servers/issues/186","number":186,"state":"open","locked":false,"title":"Keep pcap loop alive even if errors occur.","user":{"login":"maffoo","id":129268,"avatar_url":"https://avatars.githubusercontent.com/u/129268?v=3","gravatar_id":"","url":"https://api.github.com/users/maffoo","html_url":"https://github.com/maffoo","followers_url":"https://api.github.com/users/maffoo/followers","following_url":"https://api.github.com/users/maffoo/following{/other_user}","gists_url":"https://api.github.com/users/maffoo/gists{/gist_id}","starred_url":"https://api.github.com/users/maffoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maffoo/subscriptions","organizations_url":"https://api.github.com/users/maffoo/orgs","repos_url":"https://api.github.com/users/maffoo/repos","events_url":"https://api.github.com/users/maffoo/events{/privacy}","received_events_url":"https://api.github.com/users/maffoo/received_events","type":"User","site_admin":false},"body":"Fixes #182 \r\n\r\nI think this is probably worth having even if the firewall configuration changes fix the pcap errors. We will want to monitor the logs for any errors that crop up in case this happens frequently, but that's a whole other thing...\r\n","created_at":"2015-06-09T00:30:03Z","updated_at":"2015-07-07T18:34:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a17027a12403d71b2b0787ac1356b1dfeb48c391","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/martinisgroup/servers/pulls/186/commits","review_comments_url":"https://api.github.com/repos/martinisgroup/servers/pulls/186/comments","review_comment_url":"https://api.github.com/repos/martinisgroup/servers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/martinisgroup/servers/issues/186/comments","statuses_url":"https://api.github.com/repos/martinisgroup/servers/statuses/aa133097f38aa998b0d0c32f74ed2765d0c46751","head":{"label":"martinisgroup:u/maffoo/de-pcap-loop","ref":"u/maffoo/de-pcap-loop","sha":"aa133097f38aa998b0d0c32f74ed2765d0c46751","user":{"login":"martinisgroup","id":5026004,"avatar_url":"https://avatars.githubusercontent.com/u/5026004?v=3","gravatar_id":"","url":"https://api.github.com/users/martinisgroup","html_url":"https://github.com/martinisgroup","followers_url":"https://api.github.com/users/martinisgroup/followers","following_url":"https://api.github.com/users/martinisgroup/following{/other_user}","gists_url":"https://api.github.com/users/martinisgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/martinisgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinisgroup/subscriptions","organizations_url":"https://api.github.com/users/martinisgroup/orgs","repos_url":"https://api.github.com/users/martinisgroup/repos","events_url":"https://api.github.com/users/martinisgroup/events{/privacy}","received_events_url":"https://api.github.com/users/martinisgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":21184808,"name":"servers","full_name":"martinisgroup/servers","owner":{"login":"martinisgroup","id":5026004,"avatar_url":"https://avatars.githubusercontent.com/u/5026004?v=3","gravatar_id":"","url":"https://api.github.com/users/martinisgroup","html_url":"https://github.com/martinisgroup","followers_url":"https://api.github.com/users/martinisgroup/followers","following_url":"https://api.github.com/users/martinisgroup/following{/other_user}","gists_url":"https://api.github.com/users/martinisgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/martinisgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinisgroup/subscriptions","organizations_url":"https://api.github.com/users/martinisgroup/orgs","repos_url":"https://api.github.com/users/martinisgroup/repos","events_url":"https://api.github.com/users/martinisgroup/events{/privacy}","received_events_url":"https://api.github.com/users/martinisgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/martinisgroup/servers","description":"","fork":false,"url":"https://api.github.com/repos/martinisgroup/servers","forks_url":"https://api.github.com/repos/martinisgroup/servers/forks","keys_url":"https://api.github.com/repos/martinisgroup/servers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinisgroup/servers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinisgroup/servers/teams","hooks_url":"https://api.github.com/repos/martinisgroup/servers/hooks","issue_events_url":"https://api.github.com/repos/martinisgroup/servers/issues/events{/number}","events_url":"https://api.github.com/repos/martinisgroup/servers/events","assignees_url":"https://api.github.com/repos/martinisgroup/servers/assignees{/user}","branches_url":"https://api.github.com/repos/martinisgroup/servers/branches{/branch}","tags_url":"https://api.github.com/repos/martinisgroup/servers/tags","blobs_url":"https://api.github.com/repos/martinisgroup/servers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinisgroup/servers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinisgroup/servers/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinisgroup/servers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinisgroup/servers/statuses/{sha}","languages_url":"https://api.github.com/repos/martinisgroup/servers/languages","stargazers_url":"https://api.github.com/repos/martinisgroup/servers/stargazers","contributors_url":"https://api.github.com/repos/martinisgroup/servers/contributors","subscribers_url":"https://api.github.com/repos/martinisgroup/servers/subscribers","subscription_url":"https://api.github.com/repos/martinisgroup/servers/subscription","commits_url":"https://api.github.com/repos/martinisgroup/servers/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinisgroup/servers/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinisgroup/servers/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinisgroup/servers/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinisgroup/servers/contents/{+path}","compare_url":"https://api.github.com/repos/martinisgroup/servers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinisgroup/servers/merges","archive_url":"https://api.github.com/repos/martinisgroup/servers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinisgroup/servers/downloads","issues_url":"https://api.github.com/repos/martinisgroup/servers/issues{/number}","pulls_url":"https://api.github.com/repos/martinisgroup/servers/pulls{/number}","milestones_url":"https://api.github.com/repos/martinisgroup/servers/milestones{/number}","notifications_url":"https://api.github.com/repos/martinisgroup/servers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinisgroup/servers/labels{/name}","releases_url":"https://api.github.com/repos/martinisgroup/servers/releases{/id}","created_at":"2014-06-25T00:07:25Z","updated_at":"2015-05-08T02:18:50Z","pushed_at":"2015-07-07T16:52:23Z","git_url":"git://github.com/martinisgroup/servers.git","ssh_url":"git@github.com:martinisgroup/servers.git","clone_url":"https://github.com/martinisgroup/servers.git","svn_url":"https://github.com/martinisgroup/servers","homepage":null,"size":54621,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":55,"forks":4,"open_issues":55,"watchers":2,"default_branch":"master"}},"base":{"label":"martinisgroup:master","ref":"master","sha":"6f1647016aef87bebf1adb5a410c0b89f5e6bdbb","user":{"login":"martinisgroup","id":5026004,"avatar_url":"https://avatars.githubusercontent.com/u/5026004?v=3","gravatar_id":"","url":"https://api.github.com/users/martinisgroup","html_url":"https://github.com/martinisgroup","followers_url":"https://api.github.com/users/martinisgroup/followers","following_url":"https://api.github.com/users/martinisgroup/following{/other_user}","gists_url":"https://api.github.com/users/martinisgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/martinisgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinisgroup/subscriptions","organizations_url":"https://api.github.com/users/martinisgroup/orgs","repos_url":"https://api.github.com/users/martinisgroup/repos","events_url":"https://api.github.com/users/martinisgroup/events{/privacy}","received_events_url":"https://api.github.com/users/martinisgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":21184808,"name":"servers","full_name":"martinisgroup/servers","owner":{"login":"martinisgroup","id":5026004,"avatar_url":"https://avatars.githubusercontent.com/u/5026004?v=3","gravatar_id":"","url":"https://api.github.com/users/martinisgroup","html_url":"https://github.com/martinisgroup","followers_url":"https://api.github.com/users/martinisgroup/followers","following_url":"https://api.github.com/users/martinisgroup/following{/other_user}","gists_url":"https://api.github.com/users/martinisgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/martinisgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinisgroup/subscriptions","organizations_url":"https://api.github.com/users/martinisgroup/orgs","repos_url":"https://api.github.com/users/martinisgroup/repos","events_url":"https://api.github.com/users/martinisgroup/events{/privacy}","received_events_url":"https://api.github.com/users/martinisgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/martinisgroup/servers","description":"","fork":false,"url":"https://api.github.com/repos/martinisgroup/servers","forks_url":"https://api.github.com/repos/martinisgroup/servers/forks","keys_url":"https://api.github.com/repos/martinisgroup/servers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinisgroup/servers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinisgroup/servers/teams","hooks_url":"https://api.github.com/repos/martinisgroup/servers/hooks","issue_events_url":"https://api.github.com/repos/martinisgroup/servers/issues/events{/number}","events_url":"https://api.github.com/repos/martinisgroup/servers/events","assignees_url":"https://api.github.com/repos/martinisgroup/servers/assignees{/user}","branches_url":"https://api.github.com/repos/martinisgroup/servers/branches{/branch}","tags_url":"https://api.github.com/repos/martinisgroup/servers/tags","blobs_url":"https://api.github.com/repos/martinisgroup/servers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinisgroup/servers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinisgroup/servers/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinisgroup/servers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinisgroup/servers/statuses/{sha}","languages_url":"https://api.github.com/repos/martinisgroup/servers/languages","stargazers_url":"https://api.github.com/repos/martinisgroup/servers/stargazers","contributors_url":"https://api.github.com/repos/martinisgroup/servers/contributors","subscribers_url":"https://api.github.com/repos/martinisgroup/servers/subscribers","subscription_url":"https://api.github.com/repos/martinisgroup/servers/subscription","commits_url":"https://api.github.com/repos/martinisgroup/servers/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinisgroup/servers/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinisgroup/servers/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinisgroup/servers/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinisgroup/servers/contents/{+path}","compare_url":"https://api.github.com/repos/martinisgroup/servers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinisgroup/servers/merges","archive_url":"https://api.github.com/repos/martinisgroup/servers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinisgroup/servers/downloads","issues_url":"https://api.github.com/repos/martinisgroup/servers/issues{/number}","pulls_url":"https://api.github.com/repos/martinisgroup/servers/pulls{/number}","milestones_url":"https://api.github.com/repos/martinisgroup/servers/milestones{/number}","notifications_url":"https://api.github.com/repos/martinisgroup/servers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinisgroup/servers/labels{/name}","releases_url":"https://api.github.com/repos/martinisgroup/servers/releases{/id}","created_at":"2014-06-25T00:07:25Z","updated_at":"2015-05-08T02:18:50Z","pushed_at":"2015-07-07T16:52:23Z","git_url":"git://github.com/martinisgroup/servers.git","ssh_url":"git@github.com:martinisgroup/servers.git","clone_url":"https://github.com/martinisgroup/servers.git","svn_url":"https://github.com/martinisgroup/servers","homepage":null,"size":54621,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":55,"forks":4,"open_issues":55,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/186"},"html":{"href":"https://github.com/martinisgroup/servers/pull/186"},"issue":{"href":"https://api.github.com/repos/martinisgroup/servers/issues/186"},"comments":{"href":"https://api.github.com/repos/martinisgroup/servers/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/martinisgroup/servers/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/martinisgroup/servers/statuses/aa133097f38aa998b0d0c32f74ed2765d0c46751"}}}}