refactor wakeupcnxn