improved RegServer handling of closed acceptor (listening socket) - was going into an infinite loop