{"action":"created","issue":{"url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/8","repository_url":"https://api.github.com/repos/hirschenberger/modbus-rs","labels_url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/8/comments","events_url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/8/events","html_url":"https://github.com/hirschenberger/modbus-rs/issues/8","id":137339316,"number":8,"title":"disconnecting the client","user":{"login":"flosse","id":276043,"avatar_url":"https://avatars.githubusercontent.com/u/276043?v=3","gravatar_id":"","url":"https://api.github.com/users/flosse","html_url":"https://github.com/flosse","followers_url":"https://api.github.com/users/flosse/followers","following_url":"https://api.github.com/users/flosse/following{/other_user}","gists_url":"https://api.github.com/users/flosse/gists{/gist_id}","starred_url":"https://api.github.com/users/flosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flosse/subscriptions","organizations_url":"https://api.github.com/users/flosse/orgs","repos_url":"https://api.github.com/users/flosse/repos","events_url":"https://api.github.com/users/flosse/events{/privacy}","received_events_url":"https://api.github.com/users/flosse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T18:58:47Z","updated_at":"2016-02-29T22:28:58Z","closed_at":null,"body":"At the moment the client disconnects automatically because of the implemented `Drop` trait. But if something fails, [I have no chance to catch the error](https://github.com/hirschenberger/modbus-rs/blob/master/src/tcp.rs#L214) :(\r\nWhat about using a `close` method that returns a `Result` ?"},"comment":{"url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/comments/190428924","html_url":"https://github.com/hirschenberger/modbus-rs/issues/8#issuecomment-190428924","issue_url":"https://api.github.com/repos/hirschenberger/modbus-rs/issues/8","id":190428924,"user":{"login":"hirschenberger","id":1053180,"avatar_url":"https://avatars.githubusercontent.com/u/1053180?v=3","gravatar_id":"","url":"https://api.github.com/users/hirschenberger","html_url":"https://github.com/hirschenberger","followers_url":"https://api.github.com/users/hirschenberger/followers","following_url":"https://api.github.com/users/hirschenberger/following{/other_user}","gists_url":"https://api.github.com/users/hirschenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/hirschenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hirschenberger/subscriptions","organizations_url":"https://api.github.com/users/hirschenberger/orgs","repos_url":"https://api.github.com/users/hirschenberger/repos","events_url":"https://api.github.com/users/hirschenberger/events{/privacy}","received_events_url":"https://api.github.com/users/hirschenberger/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T22:28:58Z","updated_at":"2016-02-29T22:28:58Z","body":"You mean the chance to catch the error of a failed shutdown of the TcpStream? Does this make sense at all? What would be the consequence in the client code?"}}