redod: Close the listener on exit