[
https://issues.apache.org/jira/browse/AMQ-9723?focusedWorklogId=971802&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-971802
]
ASF GitHub Bot logged work on AMQ-9723:
---------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jun/25 12:12
Start Date: 04/Jun/25 12:12
Worklog Time Spent: 10m
Work Description: dk2k commented on code in PR #1449:
URL: https://github.com/apache/activemq/pull/1449#discussion_r2126447715
##########
activemq-client/src/main/java/org/apache/activemq/transport/tcp/QualityOfServiceUtils.java:
##########
@@ -125,15 +126,17 @@ private static int adjustDSCPForECN(int dscp)
// The only way to see if there are any values set for the ECN is to
// read the traffic class automatically set by the system and isolate
// the ECN bits.
- Socket socket = new Socket();
- try {
+ try (Socket socket = new Socket()) {
int systemTrafficClass = socket.getTrafficClass();
// The 1st and 2nd bits of the system traffic class are the ECN
// bits.
return (dscp << 2) | (systemTrafficClass & 3);
} catch (SocketException e) {
throw new IllegalArgumentException("Setting Differentiated
Services"
+ " not supported: " + e);
+ } catch (IOException e) {
Review Comment:
done
Issue Time Tracking
-------------------
Worklog Id: (was: 971802)
Time Spent: 50m (was: 40m)
> Socket isn't closed in QualityOfServiceUtils
> --------------------------------------------
>
> Key: AMQ-9723
> URL: https://issues.apache.org/jira/browse/AMQ-9723
> Project: ActiveMQ Classic
> Issue Type: Bug
> Reporter: Dmitrii Kriukov
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> I will provide a PR
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact