{"action":"closed","number":5,"pull_request":{"url":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5","id":98812867,"html_url":"https://github.com/andrenth/ocaml-mariadb/pull/5","diff_url":"https://github.com/andrenth/ocaml-mariadb/pull/5.diff","patch_url":"https://github.com/andrenth/ocaml-mariadb/pull/5.patch","issue_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/5","number":5,"state":"closed","locked":false,"title":"Timeouts in Lwt example implementation","user":{"login":"andreas","id":2518,"avatar_url":"https://avatars.githubusercontent.com/u/2518?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas","html_url":"https://github.com/andreas","followers_url":"https://api.github.com/users/andreas/followers","following_url":"https://api.github.com/users/andreas/following{/other_user}","gists_url":"https://api.github.com/users/andreas/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas/subscriptions","organizations_url":"https://api.github.com/users/andreas/orgs","repos_url":"https://api.github.com/users/andreas/repos","events_url":"https://api.github.com/users/andreas/events{/privacy}","received_events_url":"https://api.github.com/users/andreas/received_events","type":"User","site_admin":false},"body":"I think there's a bug in the `wait`-function of the current Lwt example implementation. I tried to use the example Lwt implementation, but when I try to connect it times out immediately.\r\n\r\nIn the current implementation `Lwt_unix.timeout` fails immediately when `Mariadb.Nonblocking.timeout mariadb` returns 0. This appears to be different behavior than the [example from the MariaDB documentation](https://mariadb.com/kb/en/mariadb/using-the-non-blocking-library/). There, the value returned from `mysql_get_timeout_value` is used directly as the timeout value for `poll`. According to the man page this means:\r\n\r\n> Specifying a timeout of zero causes poll() to return immediately, even if no file descriptors are ready.\r\n\r\nI believe the proposed changes match the above description better and appears to solve my problem.","created_at":"2016-12-20T19:43:46Z","updated_at":"2016-12-21T10:33:31Z","closed_at":"2016-12-21T10:33:31Z","merged_at":"2016-12-21T10:33:31Z","merge_commit_sha":"a60209120cd78d568ebc64166b528cb8d6bcae00","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5/commits","review_comments_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5/comments","review_comment_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/5/comments","statuses_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/statuses/4705e587c5f2aed1c1d52d417dc2408f33182aac","head":{"label":"andreas:lwt-wait-timeout","ref":"lwt-wait-timeout","sha":"4705e587c5f2aed1c1d52d417dc2408f33182aac","user":{"login":"andreas","id":2518,"avatar_url":"https://avatars.githubusercontent.com/u/2518?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas","html_url":"https://github.com/andreas","followers_url":"https://api.github.com/users/andreas/followers","following_url":"https://api.github.com/users/andreas/following{/other_user}","gists_url":"https://api.github.com/users/andreas/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas/subscriptions","organizations_url":"https://api.github.com/users/andreas/orgs","repos_url":"https://api.github.com/users/andreas/repos","events_url":"https://api.github.com/users/andreas/events{/privacy}","received_events_url":"https://api.github.com/users/andreas/received_events","type":"User","site_admin":false},"repo":{"id":76985723,"name":"ocaml-mariadb","full_name":"andreas/ocaml-mariadb","owner":{"login":"andreas","id":2518,"avatar_url":"https://avatars.githubusercontent.com/u/2518?v=3","gravatar_id":"","url":"https://api.github.com/users/andreas","html_url":"https://github.com/andreas","followers_url":"https://api.github.com/users/andreas/followers","following_url":"https://api.github.com/users/andreas/following{/other_user}","gists_url":"https://api.github.com/users/andreas/gists{/gist_id}","starred_url":"https://api.github.com/users/andreas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreas/subscriptions","organizations_url":"https://api.github.com/users/andreas/orgs","repos_url":"https://api.github.com/users/andreas/repos","events_url":"https://api.github.com/users/andreas/events{/privacy}","received_events_url":"https://api.github.com/users/andreas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreas/ocaml-mariadb","description":"OCaml bindings to MariaDB's libmysqlclient supporting the nonblocking API","fork":true,"url":"https://api.github.com/repos/andreas/ocaml-mariadb","forks_url":"https://api.github.com/repos/andreas/ocaml-mariadb/forks","keys_url":"https://api.github.com/repos/andreas/ocaml-mariadb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreas/ocaml-mariadb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreas/ocaml-mariadb/teams","hooks_url":"https://api.github.com/repos/andreas/ocaml-mariadb/hooks","issue_events_url":"https://api.github.com/repos/andreas/ocaml-mariadb/issues/events{/number}","events_url":"https://api.github.com/repos/andreas/ocaml-mariadb/events","assignees_url":"https://api.github.com/repos/andreas/ocaml-mariadb/assignees{/user}","branches_url":"https://api.github.com/repos/andreas/ocaml-mariadb/branches{/branch}","tags_url":"https://api.github.com/repos/andreas/ocaml-mariadb/tags","blobs_url":"https://api.github.com/repos/andreas/ocaml-mariadb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreas/ocaml-mariadb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreas/ocaml-mariadb/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreas/ocaml-mariadb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreas/ocaml-mariadb/statuses/{sha}","languages_url":"https://api.github.com/repos/andreas/ocaml-mariadb/languages","stargazers_url":"https://api.github.com/repos/andreas/ocaml-mariadb/stargazers","contributors_url":"https://api.github.com/repos/andreas/ocaml-mariadb/contributors","subscribers_url":"https://api.github.com/repos/andreas/ocaml-mariadb/subscribers","subscription_url":"https://api.github.com/repos/andreas/ocaml-mariadb/subscription","commits_url":"https://api.github.com/repos/andreas/ocaml-mariadb/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreas/ocaml-mariadb/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreas/ocaml-mariadb/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreas/ocaml-mariadb/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreas/ocaml-mariadb/contents/{+path}","compare_url":"https://api.github.com/repos/andreas/ocaml-mariadb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreas/ocaml-mariadb/merges","archive_url":"https://api.github.com/repos/andreas/ocaml-mariadb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreas/ocaml-mariadb/downloads","issues_url":"https://api.github.com/repos/andreas/ocaml-mariadb/issues{/number}","pulls_url":"https://api.github.com/repos/andreas/ocaml-mariadb/pulls{/number}","milestones_url":"https://api.github.com/repos/andreas/ocaml-mariadb/milestones{/number}","notifications_url":"https://api.github.com/repos/andreas/ocaml-mariadb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreas/ocaml-mariadb/labels{/name}","releases_url":"https://api.github.com/repos/andreas/ocaml-mariadb/releases{/id}","deployments_url":"https://api.github.com/repos/andreas/ocaml-mariadb/deployments","created_at":"2016-12-20T19:31:27Z","updated_at":"2016-12-20T18:43:17Z","pushed_at":"2016-12-20T19:40:31Z","git_url":"git://github.com/andreas/ocaml-mariadb.git","ssh_url":"git@github.com:andreas/ocaml-mariadb.git","clone_url":"https://github.com/andreas/ocaml-mariadb.git","svn_url":"https://github.com/andreas/ocaml-mariadb","homepage":"","size":233,"stargazers_count":0,"watchers_count":0,"language":null,"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":"andrenth:master","ref":"master","sha":"b850432620d6fd10b2c4c85d30e52a17bd152b48","user":{"login":"andrenth","id":30213,"avatar_url":"https://avatars.githubusercontent.com/u/30213?v=3","gravatar_id":"","url":"https://api.github.com/users/andrenth","html_url":"https://github.com/andrenth","followers_url":"https://api.github.com/users/andrenth/followers","following_url":"https://api.github.com/users/andrenth/following{/other_user}","gists_url":"https://api.github.com/users/andrenth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenth/subscriptions","organizations_url":"https://api.github.com/users/andrenth/orgs","repos_url":"https://api.github.com/users/andrenth/repos","events_url":"https://api.github.com/users/andrenth/events{/privacy}","received_events_url":"https://api.github.com/users/andrenth/received_events","type":"User","site_admin":false},"repo":{"id":63977370,"name":"ocaml-mariadb","full_name":"andrenth/ocaml-mariadb","owner":{"login":"andrenth","id":30213,"avatar_url":"https://avatars.githubusercontent.com/u/30213?v=3","gravatar_id":"","url":"https://api.github.com/users/andrenth","html_url":"https://github.com/andrenth","followers_url":"https://api.github.com/users/andrenth/followers","following_url":"https://api.github.com/users/andrenth/following{/other_user}","gists_url":"https://api.github.com/users/andrenth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenth/subscriptions","organizations_url":"https://api.github.com/users/andrenth/orgs","repos_url":"https://api.github.com/users/andrenth/repos","events_url":"https://api.github.com/users/andrenth/events{/privacy}","received_events_url":"https://api.github.com/users/andrenth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrenth/ocaml-mariadb","description":"OCaml bindings to MariaDB's libmysqlclient supporting the nonblocking API","fork":false,"url":"https://api.github.com/repos/andrenth/ocaml-mariadb","forks_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/forks","keys_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/teams","hooks_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/hooks","issue_events_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/events{/number}","events_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/events","assignees_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/assignees{/user}","branches_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/branches{/branch}","tags_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/tags","blobs_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/statuses/{sha}","languages_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/languages","stargazers_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/stargazers","contributors_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/contributors","subscribers_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/subscribers","subscription_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/subscription","commits_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/contents/{+path}","compare_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/merges","archive_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/downloads","issues_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues{/number}","pulls_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls{/number}","milestones_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/milestones{/number}","notifications_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/labels{/name}","releases_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/releases{/id}","deployments_url":"https://api.github.com/repos/andrenth/ocaml-mariadb/deployments","created_at":"2016-07-22T19:12:41Z","updated_at":"2016-12-20T18:43:17Z","pushed_at":"2016-12-21T10:33:31Z","git_url":"git://github.com/andrenth/ocaml-mariadb.git","ssh_url":"git@github.com:andrenth/ocaml-mariadb.git","clone_url":"https://github.com/andrenth/ocaml-mariadb.git","svn_url":"https://github.com/andrenth/ocaml-mariadb","homepage":"","size":232,"stargazers_count":14,"watchers_count":14,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5"},"html":{"href":"https://github.com/andrenth/ocaml-mariadb/pull/5"},"issue":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/5"},"comments":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/andrenth/ocaml-mariadb/statuses/4705e587c5f2aed1c1d52d417dc2408f33182aac"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"andrenth","id":30213,"avatar_url":"https://avatars.githubusercontent.com/u/30213?v=3","gravatar_id":"","url":"https://api.github.com/users/andrenth","html_url":"https://github.com/andrenth","followers_url":"https://api.github.com/users/andrenth/followers","following_url":"https://api.github.com/users/andrenth/following{/other_user}","gists_url":"https://api.github.com/users/andrenth/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenth/subscriptions","organizations_url":"https://api.github.com/users/andrenth/orgs","repos_url":"https://api.github.com/users/andrenth/repos","events_url":"https://api.github.com/users/andrenth/events{/privacy}","received_events_url":"https://api.github.com/users/andrenth/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"andrenth"}}