reverse order of listenandserve calls, tls should be first because it may not block