{"action":"created","issue":{"url":"https://api.github.com/repos/ruscito/pycomm/issues/4","labels_url":"https://api.github.com/repos/ruscito/pycomm/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ruscito/pycomm/issues/4/comments","events_url":"https://api.github.com/repos/ruscito/pycomm/issues/4/events","html_url":"https://github.com/ruscito/pycomm/issues/4","id":98331327,"number":4,"title":"Connection Recovery","user":{"login":"cldodd","id":12900001,"avatar_url":"https://avatars.githubusercontent.com/u/12900001?v=3","gravatar_id":"","url":"https://api.github.com/users/cldodd","html_url":"https://github.com/cldodd","followers_url":"https://api.github.com/users/cldodd/followers","following_url":"https://api.github.com/users/cldodd/following{/other_user}","gists_url":"https://api.github.com/users/cldodd/gists{/gist_id}","starred_url":"https://api.github.com/users/cldodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cldodd/subscriptions","organizations_url":"https://api.github.com/users/cldodd/orgs","repos_url":"https://api.github.com/users/cldodd/repos","events_url":"https://api.github.com/users/cldodd/events{/privacy}","received_events_url":"https://api.github.com/users/cldodd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-31T07:18:01Z","updated_at":"2015-08-04T15:33:45Z","closed_at":"2015-07-31T23:19:37Z","body":"Hi ruscito\r\nSorry, I am a Git novice and newbie to Python but old die hard AB man. Figured (Issues is how to post questions?) I have scripts running between CLX & ML1100 inserting data (Floats/Reals) into mySql on a Raspberry 2. I am impressed and thankful of your efforts in concluding this project - well done. My task is to provide a 24x7 (60 second update/storage) of PLC data for compliance on Water Treatment stations in remote locations. For this reason I have been testing to ensure NOTHING will break the script (my logger script) resulting in loss of data. During the testing I have been making/breaking ethernet connections while polling data and have had several issues where comms is lost and non recoverable. Have you any suggestions on how best to handle make/break situations allowing the CIP connection reestablish gracefully without crashing. Obviously I have rapped some try/except error handling clauses in the script but am struggling with maintaining continuity during abnormal situations. Any suggestions gratefully appreciated Regards Chris"},"comment":{"url":"https://api.github.com/repos/ruscito/pycomm/issues/comments/127651385","html_url":"https://github.com/ruscito/pycomm/issues/4#issuecomment-127651385","issue_url":"https://api.github.com/repos/ruscito/pycomm/issues/4","id":127651385,"user":{"login":"lynnlinse","id":9847608,"avatar_url":"https://avatars.githubusercontent.com/u/9847608?v=3","gravatar_id":"","url":"https://api.github.com/users/lynnlinse","html_url":"https://github.com/lynnlinse","followers_url":"https://api.github.com/users/lynnlinse/followers","following_url":"https://api.github.com/users/lynnlinse/following{/other_user}","gists_url":"https://api.github.com/users/lynnlinse/gists{/gist_id}","starred_url":"https://api.github.com/users/lynnlinse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lynnlinse/subscriptions","organizations_url":"https://api.github.com/users/lynnlinse/orgs","repos_url":"https://api.github.com/users/lynnlinse/repos","events_url":"https://api.github.com/users/lynnlinse/events{/privacy}","received_events_url":"https://api.github.com/users/lynnlinse/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T15:33:45Z","updated_at":"2015-08-04T15:33:45Z","body":"Lynn strongly suggests that during any error, just tear down and start with a new socket. This will be most predictable, and the least new code to write & test.\r\n\r\nThe problem is that even within AB's product lines, support for the 'purity' of the spec varies. For example, the ControlLogix is the poster-child for graceful perfection - actually using ForwardClose, so saying 'please' and 'thank you', etc. In contrast some of the older MicroLogix/SLC5 just hang up the socket. So I would worry that any clever (& spec-legal) attempt to heal a connection might suffer from unpredictability based on model & FW age ... and that's not even thinking about all the third-party I/O blocks supporting EIP, which might do something else!"}}