Remove listeners from server when stop() method is called.