{"action":"created","issue":{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/312","repository_url":"https://api.github.com/repos/fo-dicom/fo-dicom","labels_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/312/comments","events_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/312/events","html_url":"https://github.com/fo-dicom/fo-dicom/issues/312","id":158010440,"number":312,"title":"Please discuss: should DicomService.SendNextMessage throw?","user":{"login":"anders9ustafsson","id":6515030,"avatar_url":"https://avatars.githubusercontent.com/u/6515030?v=3","gravatar_id":"","url":"https://api.github.com/users/anders9ustafsson","html_url":"https://github.com/anders9ustafsson","followers_url":"https://api.github.com/users/anders9ustafsson/followers","following_url":"https://api.github.com/users/anders9ustafsson/following{/other_user}","gists_url":"https://api.github.com/users/anders9ustafsson/gists{/gist_id}","starred_url":"https://api.github.com/users/anders9ustafsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anders9ustafsson/subscriptions","organizations_url":"https://api.github.com/users/anders9ustafsson/orgs","repos_url":"https://api.github.com/users/anders9ustafsson/repos","events_url":"https://api.github.com/users/anders9ustafsson/events{/privacy}","received_events_url":"https://api.github.com/users/anders9ustafsson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-01T21:23:55Z","updated_at":"2016-06-06T06:43:39Z","closed_at":null,"body":"I would like to have the community's opinion on the following issue.\r\n\r\nIn `DicomService.SendNextMessage`, there are two lines where, if conditions are met, the method does not send the next message but simply returns. A common side-effect of this is that the receiving end is waiting indefinitely (or at least until the timeout), and there is no notification of what is going wrong.\r\n\r\nThe two lines are as of now [839](https://github.com/fo-dicom/fo-dicom/blob/development/DICOM/Network/DicomService.cs#L839) and [841](https://github.com/fo-dicom/fo-dicom/blob/development/DICOM/Network/DicomService.cs#L841)\r\n\r\n    if (_sending) return;\r\n\r\n    if (Association.MaxAsyncOpsInvoked > 0 && _pending.Count >= Association.MaxAsyncOpsInvoked) return;\r\n\r\nShould we continue silently returning under these conditions, or should we implement some kind of mitigation to aid the user and/or message receiver? If yes, what? Throw an exception? Wait until conditions are no longer met (is that even plausible)? \r\n\r\nPlease share your thoughts on this one!"},"comment":{"url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/comments/223879961","html_url":"https://github.com/fo-dicom/fo-dicom/issues/312#issuecomment-223879961","issue_url":"https://api.github.com/repos/fo-dicom/fo-dicom/issues/312","id":223879961,"user":{"login":"anders9ustafsson","id":6515030,"avatar_url":"https://avatars.githubusercontent.com/u/6515030?v=3","gravatar_id":"","url":"https://api.github.com/users/anders9ustafsson","html_url":"https://github.com/anders9ustafsson","followers_url":"https://api.github.com/users/anders9ustafsson/followers","following_url":"https://api.github.com/users/anders9ustafsson/following{/other_user}","gists_url":"https://api.github.com/users/anders9ustafsson/gists{/gist_id}","starred_url":"https://api.github.com/users/anders9ustafsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anders9ustafsson/subscriptions","organizations_url":"https://api.github.com/users/anders9ustafsson/orgs","repos_url":"https://api.github.com/users/anders9ustafsson/repos","events_url":"https://api.github.com/users/anders9ustafsson/events{/privacy}","received_events_url":"https://api.github.com/users/anders9ustafsson/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T06:43:38Z","updated_at":"2016-06-06T06:43:38Z","body":"Thanks, @Zaid-Safadi ! Yes, there are a few `async void`:s in the code. When I refactored the networking code to use `async`/`await` instead of `Begin...`/`End...` constructs, I took a few shortcuts. It is of course highest priority to fix these first, and it should then be easier to sufficiently handle these invalid states."}}
{"actor":{"display_login":"anders9ustafsson"}}