[SNMP4J] Bug report: DefaultUdpTransportMapping not Closeable

wonder365 wonder365 at eyou.com
Thu Jun 7 11:42:47 CEST 2012


Hi,

    I found if the DefaultUdpTransportMapping.socket closed abnormality, then TransportMapping can not close. I checked the code of org.snmp4j.transport.DefaultUdpTransportMapping.ListenThread.run() , and found setSocketTimeout will throw exception, and the DefaultUdpTransportMapping.isListening will always be true.

      try {
        socket.setSoTimeout(getSocketTimeout());
        ........
      }
      catch (SocketException ex) {
        logger.error(ex);
        setSocketTimeout(0); //!!! this line will throw runtimeexecption if socket.isclosed .
      }

    somebody help me and explains this?


More information about the SNMP4J mailing list