Actions
Bug #13534
closedCorrectly use asio error codes to avoid exceptions
Start date:
02/17/2025
Due date:
% Done:
100%
Estimated time:
Description
Socket operations in asio nearly always have two variants:
- call(), which will throw an exception
- call(error_code& ec), which does not throw
In case of operations where we do not really care about the error code, we should consistently pass a reference to the code, so that it can be set, but otherwise safely ignored.
Currently, there are cases where the shutdown is initiated with an ignored_ec
, but a further call to cancel()
or close()
does not use the code, and can potentially throw.
Additional improvement:
There are places where a try/catch
is performed. This is fine, as we may want to log output of it. But it ought to be handled consistently.
Either we work with error code, or either we work with exceptions.
Updated by Marnik Roosen 5 days ago
- Status changed from New to InProgress
- Assignee set to Marnik Roosen
- Target version changed from 4.11.4 to 4.11.3
Updated by Marnik Roosen 5 days ago
- Status changed from InProgress to Review
- Assignee deleted (
Marnik Roosen)
Updated by Matthias Van Ceulebroeck 4 days ago
- Assignee set to Matthias Van Ceulebroeck
Updated by Matthias Van Ceulebroeck 4 days ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Matthias Van Ceulebroeck to Marnik Roosen
- % Done changed from 0 to 100
Updated by Matthias Van Ceulebroeck 4 days ago
- Status changed from Implemented @Emweb to Implemented @Test
Updated by Matthias Van Ceulebroeck 4 days ago
- Status changed from Implemented @Test to Closed
Actions