<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gurux Java client: safe Association LN retry loop]]></title><description><![CDATA[<p dir="auto">A retry must create a new evidence boundary. Reusing a half-open connection can hide whether the counter, challenge, or transport failed.</p>
<pre><code class="language-java">public final class AssociationRetry {
    public Result execute(ClientFactory factory, int maxAttempts) throws Exception {
        Exception last = null;
        for (int attempt = 1; attempt &lt;= maxAttempts; attempt++) {
            try (DlmsClient client = factory.open()) {
                client.associate();
                return client.read("0.0.40.0.0.255", 2);
            } catch (TemporaryTransportException ex) {
                last = ex;
            }
        }
        throw last;
    }
}
</code></pre>
<p dir="auto">Synthetic stack excerpt:</p>
<pre><code class="language-text">com.example.dlms.TemporaryTransportException: UA not received before 3000 ms
    at com.example.dlms.HdlcLink.awaitUa(HdlcLink.java:184)
    at com.example.dlms.DlmsClient.associate(DlmsClient.java:91)
    at com.example.dlms.AssociationRetry.execute(AssociationRetry.java:7)
Caused by: java.net.SocketTimeoutException: synthetic timeout
</code></pre>
]]></description><link>https://dlms.sharur.org/topic/6/gurux-java-client-safe-association-ln-retry-loop</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 19:49:14 GMT</lastBuildDate><atom:link href="https://dlms.sharur.org/topic/6.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Aug 2026 06:18:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Gurux Java client: safe Association LN retry loop on Sat, 22 Aug 2026 06:18:41 GMT]]></title><description><![CDATA[<p dir="auto">Only retry transport-class failures. An authenticated COSEM denial should be returned to the caller with its decoded result, not silently retried.</p>
]]></description><link>https://dlms.sharur.org/post/14</link><guid isPermaLink="true">https://dlms.sharur.org/post/14</guid><dc:creator><![CDATA[sharur_gate2_admin]]></dc:creator><pubDate>Sat, 22 Aug 2026 06:18:41 GMT</pubDate></item></channel></rss>