{"action":"created","issue":{"url":"https://api.github.com/repos/phpseclib/phpseclib/issues/639","labels_url":"https://api.github.com/repos/phpseclib/phpseclib/issues/639/labels{/name}","comments_url":"https://api.github.com/repos/phpseclib/phpseclib/issues/639/comments","events_url":"https://api.github.com/repos/phpseclib/phpseclib/issues/639/events","html_url":"https://github.com/phpseclib/phpseclib/pull/639","id":63155054,"number":639,"title":"improve error handling with protocol version exchange","user":{"login":"terrafrost","id":214474,"avatar_url":"https://avatars.githubusercontent.com/u/214474?v=3","gravatar_id":"","url":"https://api.github.com/users/terrafrost","html_url":"https://github.com/terrafrost","followers_url":"https://api.github.com/users/terrafrost/followers","following_url":"https://api.github.com/users/terrafrost/following{/other_user}","gists_url":"https://api.github.com/users/terrafrost/gists{/gist_id}","starred_url":"https://api.github.com/users/terrafrost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrafrost/subscriptions","organizations_url":"https://api.github.com/users/terrafrost/orgs","repos_url":"https://api.github.com/users/terrafrost/repos","events_url":"https://api.github.com/users/terrafrost/events{/privacy}","received_events_url":"https://api.github.com/users/terrafrost/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phpseclib/phpseclib/labels/review","name":"review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-20T04:07:04Z","updated_at":"2015-03-28T00:19:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phpseclib/phpseclib/pulls/639","html_url":"https://github.com/phpseclib/phpseclib/pull/639","diff_url":"https://github.com/phpseclib/phpseclib/pull/639.diff","patch_url":"https://github.com/phpseclib/phpseclib/pull/639.patch"},"body":"See #634 and https://tools.ietf.org/html/rfc4253#section-4.2"},"comment":{"url":"https://api.github.com/repos/phpseclib/phpseclib/issues/comments/87129194","html_url":"https://github.com/phpseclib/phpseclib/pull/639#issuecomment-87129194","issue_url":"https://api.github.com/repos/phpseclib/phpseclib/issues/639","id":87129194,"user":{"login":"terrafrost","id":214474,"avatar_url":"https://avatars.githubusercontent.com/u/214474?v=3","gravatar_id":"","url":"https://api.github.com/users/terrafrost","html_url":"https://github.com/terrafrost","followers_url":"https://api.github.com/users/terrafrost/followers","following_url":"https://api.github.com/users/terrafrost/following{/other_user}","gists_url":"https://api.github.com/users/terrafrost/gists{/gist_id}","starred_url":"https://api.github.com/users/terrafrost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrafrost/subscriptions","organizations_url":"https://api.github.com/users/terrafrost/orgs","repos_url":"https://api.github.com/users/terrafrost/repos","events_url":"https://api.github.com/users/terrafrost/events{/privacy}","received_events_url":"https://api.github.com/users/terrafrost/received_events","type":"User","site_admin":false},"created_at":"2015-03-28T00:19:32Z","updated_at":"2015-03-28T00:19:32Z","body":"> This patch is not good in so far that the connectionTimeout property is no longer used.\r\n\r\nThat's a good point although I'm thinking it can just be deleted.\r\n\r\n> Generally, I think it would make sense to have multiple / different timeout settings. E.g. different ones for connect() and read(). I am not sure whether that is already the case and didn't look too deep into the pull request.\r\n\r\nBy default it gets reset. So if the timeout is 10 seconds and it takes 8 seconds to connect the timeout for the read() will still be 10 seconds. If you want the timeout to be cumulative between read()'s and exec()'s you'll need to keep track of the elapsed time yourself and call `setTimeout` as appropriate before each read() / exec() call.\r\n\r\nhttp://phpseclib.sourceforge.net/ssh/examples.html#timeout elaborates.\r\n\r\nIn #634 I said that that one didn't have cumulative timeout's but that one is a little different. The timeout's for this PR are cumulative between each stream_select call, so long as the stream_select call is for the constructor or for read() / exec(). #634 wasn't even cumulative even for stream_select."}}