File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -342,15 +342,17 @@ else if (svc == KNXnetIPHeader.CONNECT_RES) {
342342 channelId = res .getChannelID ();
343343 if (stream || (useNat && ep .nat ())) {
344344 dataEp = src ;
345- dataEndpt = (InetSocketAddress ) dataEp .address ();
345+ if (dataEp .address () instanceof final InetSocketAddress isa )
346+ dataEndpt = isa ;
346347 }
347348 else {
348349 dataEp = switch (ctrlEp ) {
349350 case final UdpEndpointAddress __ -> new UdpEndpointAddress (ep .endpoint ());
350351 case final TcpEndpointAddress __ -> new TcpEndpointAddress (ep .endpoint ());
351352 case final UdsEndpointAddress uds -> uds ;
352353 };
353- dataEndpt = (InetSocketAddress ) dataEp .address ();
354+ if (dataEp .address () instanceof final InetSocketAddress isa )
355+ dataEndpt = isa ;
354356 }
355357
356358
You can’t perform that action at this time.
0 commit comments