Propertly handling listener restart