question: synchronized void closeTrapSocketIfNeeded ( ) { if ( ( trapSocket != null ) && ( state != ONLINE ) ) { trapSocket . close ( ) ; trapSocket = null ; } }
target:  Close trapSocket if the SNMP protocol adaptor is not ONLINE.