Hi Ladd,

This fix could indeed improve the transport mappings behavior in some situations!
Thanks for sorting this out.
The getFirst() calling is inefficient, because it takes several loops to get all keys processed (they are removed from the list by other code). In the case of a dropped connection, it should have worked too with the getFirst() because an exception would have removed
the key from the list.

Best regards,
Frank


Am 19.06.2014 20:53, schrieb Ladd:
Ladd <ladd@...> writes:

I think I found the it!!  DefaultTcpTransportMapping has this method:

     private void processPending() {
        
       synchronized (pending) {
         for (int i=0; i<pending.size(); i++) {
           SocketEntry entry = pending.getFirst();
           /*
            *   ... continue on to process entry
            */

Works great if there's only one pending entry.  But the bug occurs when
there are two or more due getFirst() being called over and over.

I change it to entry = pending.get(i) and reran my test.  So far so good!

Please confirm.

Thanks!

- Ladd

_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j

Reply via email to