Do not call socket.cancel() as it is not portable.
ReleaseProfile target.