From the crash call stack, the app crashed at the line `windows_socket = nullptr;` This is because the previous line `windows_socket_.Close();` has already released all unmanaged resources associated with the StreamSocket object.
https://learn.microsoft.com/en-us/uwp/api/windows.networking.sockets.streamsocket.close?view=winrt-22621#remarks
By RAII, assigning `windows_socket_` to nullptr is equivalent to calling `delete` on the StreamSocket allocated on the heap again, which results in null pointer exception `Exception infoEXCEPTION_ACCESS_VIOLATION_READ @0x00000000` because it has already been released in the previous line by Close().
PiperOrigin-RevId: 508454142