[LOGBACK-1019] Added code to close the DatagramSocket