wait for connection handling