{"action":"created","comment":{"url":"https://api.github.com/repos/szagi3891/testhttp/pulls/comments/49069398","id":49069398,"diff_hunk":"@@ -30,16 +32,21 @@ fn main() {\n     {\n         let (tx_request, rx_request) = chan::async();       //channel::<request::Request>();\n \n-        miohttp::server::MyHandler::new(&addres.to_string(), 4000, 4000, tx_request);\n-        \n+        match miohttp::server::MyHandler::new(&addres.to_string(), 4000, 4000, tx_request) {\n+            Ok(_) => { },\n+            Err(err) => {\n+                // Return real OS error to shell\n+                process::exit(err.raw_os_error().unwrap_or(-1));","path":"src/main.rs","position":22,"original_position":22,"commit_id":"a07fced46d327a80f19f2b01cd6d77283a18caed","original_commit_id":"a07fced46d327a80f19f2b01cd6d77283a18caed","user":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"body":"Ok. To fajnie by było to wszystko wynieść do osobnej funkcji, z główną logiką która zwraca tylko kod wyjścia. A w funkcji main byłby tylko ten process::exit.","created_at":"2016-01-07T12:48:23Z","updated_at":"2016-01-07T12:48:23Z","html_url":"https://github.com/szagi3891/testhttp/pull/13#discussion_r49069398","pull_request_url":"https://api.github.com/repos/szagi3891/testhttp/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/comments/49069398"},"html":{"href":"https://github.com/szagi3891/testhttp/pull/13#discussion_r49069398"},"pull_request":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/szagi3891/testhttp/pulls/13","id":55326641,"html_url":"https://github.com/szagi3891/testhttp/pull/13","diff_url":"https://github.com/szagi3891/testhttp/pull/13.diff","patch_url":"https://github.com/szagi3891/testhttp/pull/13.patch","issue_url":"https://api.github.com/repos/szagi3891/testhttp/issues/13","number":13,"state":"closed","locked":false,"title":"Careful socket binding, improved logging.","user":{"login":"sfisol","id":7910827,"avatar_url":"https://avatars.githubusercontent.com/u/7910827?v=3","gravatar_id":"","url":"https://api.github.com/users/sfisol","html_url":"https://github.com/sfisol","followers_url":"https://api.github.com/users/sfisol/followers","following_url":"https://api.github.com/users/sfisol/following{/other_user}","gists_url":"https://api.github.com/users/sfisol/gists{/gist_id}","starred_url":"https://api.github.com/users/sfisol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfisol/subscriptions","organizations_url":"https://api.github.com/users/sfisol/orgs","repos_url":"https://api.github.com/users/sfisol/repos","events_url":"https://api.github.com/users/sfisol/events{/privacy}","received_events_url":"https://api.github.com/users/sfisol/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-07T11:18:06Z","updated_at":"2016-01-07T12:48:23Z","closed_at":"2016-01-07T12:10:10Z","merged_at":"2016-01-07T12:10:10Z","merge_commit_sha":"cca0dd2b3d5a65429131dbec60f124078ebfdb54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/szagi3891/testhttp/pulls/13/commits","review_comments_url":"https://api.github.com/repos/szagi3891/testhttp/pulls/13/comments","review_comment_url":"https://api.github.com/repos/szagi3891/testhttp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/szagi3891/testhttp/issues/13/comments","statuses_url":"https://api.github.com/repos/szagi3891/testhttp/statuses/a07fced46d327a80f19f2b01cd6d77283a18caed","head":{"label":"szagi3891:new-feature","ref":"new-feature","sha":"a07fced46d327a80f19f2b01cd6d77283a18caed","user":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"repo":{"id":47791907,"name":"testhttp","full_name":"szagi3891/testhttp","owner":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szagi3891/testhttp","description":"test http","fork":false,"url":"https://api.github.com/repos/szagi3891/testhttp","forks_url":"https://api.github.com/repos/szagi3891/testhttp/forks","keys_url":"https://api.github.com/repos/szagi3891/testhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szagi3891/testhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szagi3891/testhttp/teams","hooks_url":"https://api.github.com/repos/szagi3891/testhttp/hooks","issue_events_url":"https://api.github.com/repos/szagi3891/testhttp/issues/events{/number}","events_url":"https://api.github.com/repos/szagi3891/testhttp/events","assignees_url":"https://api.github.com/repos/szagi3891/testhttp/assignees{/user}","branches_url":"https://api.github.com/repos/szagi3891/testhttp/branches{/branch}","tags_url":"https://api.github.com/repos/szagi3891/testhttp/tags","blobs_url":"https://api.github.com/repos/szagi3891/testhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szagi3891/testhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szagi3891/testhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/szagi3891/testhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szagi3891/testhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/szagi3891/testhttp/languages","stargazers_url":"https://api.github.com/repos/szagi3891/testhttp/stargazers","contributors_url":"https://api.github.com/repos/szagi3891/testhttp/contributors","subscribers_url":"https://api.github.com/repos/szagi3891/testhttp/subscribers","subscription_url":"https://api.github.com/repos/szagi3891/testhttp/subscription","commits_url":"https://api.github.com/repos/szagi3891/testhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/szagi3891/testhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/szagi3891/testhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/szagi3891/testhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/szagi3891/testhttp/contents/{+path}","compare_url":"https://api.github.com/repos/szagi3891/testhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szagi3891/testhttp/merges","archive_url":"https://api.github.com/repos/szagi3891/testhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szagi3891/testhttp/downloads","issues_url":"https://api.github.com/repos/szagi3891/testhttp/issues{/number}","pulls_url":"https://api.github.com/repos/szagi3891/testhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/szagi3891/testhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/szagi3891/testhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szagi3891/testhttp/labels{/name}","releases_url":"https://api.github.com/repos/szagi3891/testhttp/releases{/id}","created_at":"2015-12-10T22:48:37Z","updated_at":"2015-12-10T22:50:05Z","pushed_at":"2016-01-07T12:10:10Z","git_url":"git://github.com/szagi3891/testhttp.git","ssh_url":"git@github.com:szagi3891/testhttp.git","clone_url":"https://github.com/szagi3891/testhttp.git","svn_url":"https://github.com/szagi3891/testhttp","homepage":null,"size":303,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"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":"szagi3891:master","ref":"master","sha":"7f9b5419b0e55dad5c2d51d40fcee5c3b60babe8","user":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"repo":{"id":47791907,"name":"testhttp","full_name":"szagi3891/testhttp","owner":{"login":"szagi3891","id":859451,"avatar_url":"https://avatars.githubusercontent.com/u/859451?v=3","gravatar_id":"","url":"https://api.github.com/users/szagi3891","html_url":"https://github.com/szagi3891","followers_url":"https://api.github.com/users/szagi3891/followers","following_url":"https://api.github.com/users/szagi3891/following{/other_user}","gists_url":"https://api.github.com/users/szagi3891/gists{/gist_id}","starred_url":"https://api.github.com/users/szagi3891/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szagi3891/subscriptions","organizations_url":"https://api.github.com/users/szagi3891/orgs","repos_url":"https://api.github.com/users/szagi3891/repos","events_url":"https://api.github.com/users/szagi3891/events{/privacy}","received_events_url":"https://api.github.com/users/szagi3891/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szagi3891/testhttp","description":"test http","fork":false,"url":"https://api.github.com/repos/szagi3891/testhttp","forks_url":"https://api.github.com/repos/szagi3891/testhttp/forks","keys_url":"https://api.github.com/repos/szagi3891/testhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szagi3891/testhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szagi3891/testhttp/teams","hooks_url":"https://api.github.com/repos/szagi3891/testhttp/hooks","issue_events_url":"https://api.github.com/repos/szagi3891/testhttp/issues/events{/number}","events_url":"https://api.github.com/repos/szagi3891/testhttp/events","assignees_url":"https://api.github.com/repos/szagi3891/testhttp/assignees{/user}","branches_url":"https://api.github.com/repos/szagi3891/testhttp/branches{/branch}","tags_url":"https://api.github.com/repos/szagi3891/testhttp/tags","blobs_url":"https://api.github.com/repos/szagi3891/testhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szagi3891/testhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szagi3891/testhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/szagi3891/testhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szagi3891/testhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/szagi3891/testhttp/languages","stargazers_url":"https://api.github.com/repos/szagi3891/testhttp/stargazers","contributors_url":"https://api.github.com/repos/szagi3891/testhttp/contributors","subscribers_url":"https://api.github.com/repos/szagi3891/testhttp/subscribers","subscription_url":"https://api.github.com/repos/szagi3891/testhttp/subscription","commits_url":"https://api.github.com/repos/szagi3891/testhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/szagi3891/testhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/szagi3891/testhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/szagi3891/testhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/szagi3891/testhttp/contents/{+path}","compare_url":"https://api.github.com/repos/szagi3891/testhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szagi3891/testhttp/merges","archive_url":"https://api.github.com/repos/szagi3891/testhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szagi3891/testhttp/downloads","issues_url":"https://api.github.com/repos/szagi3891/testhttp/issues{/number}","pulls_url":"https://api.github.com/repos/szagi3891/testhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/szagi3891/testhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/szagi3891/testhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szagi3891/testhttp/labels{/name}","releases_url":"https://api.github.com/repos/szagi3891/testhttp/releases{/id}","created_at":"2015-12-10T22:48:37Z","updated_at":"2015-12-10T22:50:05Z","pushed_at":"2016-01-07T12:10:10Z","git_url":"git://github.com/szagi3891/testhttp.git","ssh_url":"git@github.com:szagi3891/testhttp.git","clone_url":"https://github.com/szagi3891/testhttp.git","svn_url":"https://github.com/szagi3891/testhttp","homepage":null,"size":303,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/13"},"html":{"href":"https://github.com/szagi3891/testhttp/pull/13"},"issue":{"href":"https://api.github.com/repos/szagi3891/testhttp/issues/13"},"comments":{"href":"https://api.github.com/repos/szagi3891/testhttp/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/szagi3891/testhttp/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/szagi3891/testhttp/statuses/a07fced46d327a80f19f2b01cd6d77283a18caed"}}}}