If you need to wait until the socket is done, why not just call the next alias from the sockclose event?