{"action":"created","issue":{"url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/79","labels_url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/79/comments","events_url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/79/events","html_url":"https://github.com/WebAudio/web-midi-api/issues/79","id":19050979,"number":79,"title":"MIDI input/output disconnection - Ports should be persistent across connects/disconnects","user":{"login":"cwilso","id":507001,"avatar_url":"https://avatars.githubusercontent.com/u/507001?v=3","gravatar_id":"","url":"https://api.github.com/users/cwilso","html_url":"https://github.com/cwilso","followers_url":"https://api.github.com/users/cwilso/followers","following_url":"https://api.github.com/users/cwilso/following{/other_user}","gists_url":"https://api.github.com/users/cwilso/gists{/gist_id}","starred_url":"https://api.github.com/users/cwilso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwilso/subscriptions","organizations_url":"https://api.github.com/users/cwilso/orgs","repos_url":"https://api.github.com/users/cwilso/repos","events_url":"https://api.github.com/users/cwilso/events{/privacy}","received_events_url":"https://api.github.com/users/cwilso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cwilso","id":507001,"avatar_url":"https://avatars.githubusercontent.com/u/507001?v=3","gravatar_id":"","url":"https://api.github.com/users/cwilso","html_url":"https://github.com/cwilso","followers_url":"https://api.github.com/users/cwilso/followers","following_url":"https://api.github.com/users/cwilso/following{/other_user}","gists_url":"https://api.github.com/users/cwilso/gists{/gist_id}","starred_url":"https://api.github.com/users/cwilso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwilso/subscriptions","organizations_url":"https://api.github.com/users/cwilso/orgs","repos_url":"https://api.github.com/users/cwilso/repos","events_url":"https://api.github.com/users/cwilso/events{/privacy}","received_events_url":"https://api.github.com/users/cwilso/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/WebAudio/web-midi-api/milestones/2","html_url":"https://github.com/WebAudio/web-midi-api/milestones/V1","labels_url":"https://api.github.com/repos/WebAudio/web-midi-api/milestones/2/labels","id":294310,"number":2,"title":"V1","description":"","creator":{"login":"cwilso","id":507001,"avatar_url":"https://avatars.githubusercontent.com/u/507001?v=3","gravatar_id":"","url":"https://api.github.com/users/cwilso","html_url":"https://github.com/cwilso","followers_url":"https://api.github.com/users/cwilso/followers","following_url":"https://api.github.com/users/cwilso/following{/other_user}","gists_url":"https://api.github.com/users/cwilso/gists{/gist_id}","starred_url":"https://api.github.com/users/cwilso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwilso/subscriptions","organizations_url":"https://api.github.com/users/cwilso/orgs","repos_url":"https://api.github.com/users/cwilso/repos","events_url":"https://api.github.com/users/cwilso/events{/privacy}","received_events_url":"https://api.github.com/users/cwilso/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":10,"state":"open","created_at":"2013-03-22T22:44:06Z","updated_at":"2015-02-24T21:00:50Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2013-09-05T15:32:43Z","updated_at":"2015-03-04T18:31:41Z","closed_at":null,"body":"Reported externally:\r\n-------------\r\nWhat is the exact workflow when a MIDI input disconnects? Suppose I'm listening on port 2, which is connected at start, setting onmidimessage appropriately.\r\nThen port 2 disconnects (I receive a disconnect event on my ondisconnect handler) - What is the fate of my onmidimessage port 2 handler?\r\nIf input 2 re-connects, should I re-set the appropriate onmidimessage handler to listen for midi events on port 2, or, having set it before, the old handler (set before disconnection and reconnection) will still work?\r\n------------\r\n\r\nI *think* that when a port disconnects, it should release the event handler and the object, and they should not become live again, even when reconnected.  At the same time, the Maplike rearchitecture may change this, since that port would be the same as the previous port.  Discuss."},"comment":{"url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/comments/77216369","html_url":"https://github.com/WebAudio/web-midi-api/issues/79#issuecomment-77216369","issue_url":"https://api.github.com/repos/WebAudio/web-midi-api/issues/79","id":77216369,"user":{"login":"cwilso","id":507001,"avatar_url":"https://avatars.githubusercontent.com/u/507001?v=3","gravatar_id":"","url":"https://api.github.com/users/cwilso","html_url":"https://github.com/cwilso","followers_url":"https://api.github.com/users/cwilso/followers","following_url":"https://api.github.com/users/cwilso/following{/other_user}","gists_url":"https://api.github.com/users/cwilso/gists{/gist_id}","starred_url":"https://api.github.com/users/cwilso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwilso/subscriptions","organizations_url":"https://api.github.com/users/cwilso/orgs","repos_url":"https://api.github.com/users/cwilso/repos","events_url":"https://api.github.com/users/cwilso/events{/privacy}","received_events_url":"https://api.github.com/users/cwilso/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T18:31:41Z","updated_at":"2015-03-04T18:31:41Z","body":"1) I think \"state\" in your table should be \"state transitions to:\"\r\n2) I'm thinking that the difference between the first and second rows in your chart is ambiguous.  We probably do need to capture the difference between \"disconnected\" and \"not present\" (the latter being disconnected and not opened).  Then row 3 (disconnected, close()) transitions to \"not present\", as does row 4."}}