-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added proper error handling around sync resources #1393
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3607,7 +3607,16 @@ SRTSOCKET CUDT::makeMePeerOf(SRTSOCKET peergroup, SRT_GROUP_TYPE gtp, uint32_t l | |
} | ||
else | ||
{ | ||
gp = &newGroup(gtp); | ||
try | ||
{ | ||
gp = &newGroup(gtp); | ||
} | ||
catch (...) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Waiting for any certain exception or any? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably only system exceptions and those freshly added here (although "added" is only in order to comply with the C++ std version). |
||
{ | ||
// Expected exceptions are only those referring to system resources | ||
return -1; | ||
} | ||
|
||
if (!gp->applyFlags(link_flags, m_SrtHsSide)) | ||
{ | ||
// Wrong settings. Must reject. Delete group. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
bad_alock
was not enough there?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be some other types of exceptions thrown from the C++ standard library, as I remember. All of them qualify as IPE or at best lethal state of the system resources.