Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -695,18 +695,17 @@ internal unsafe SocketError DoOperationSendPackets(Socket socket, SafeSocketHand
{
if (spe?.FilePath != null)
{
// Create a FileStream to open the file.
// Open the file and get its handle.
_sendPacketsFileHandles[index] =
File.OpenHandle(spe.FilePath, FileMode.Open, FileAccess.Read, FileShare.Read);

// Get the file handle from the stream.
index++;
}
}
}
catch
{
// Got an exception opening a file - close any open streams, then throw.
// Got an exception opening a file - close any open files, then throw.
for (int i = index - 1; i >= 0; i--)
_sendPacketsFileHandles[i].Dispose();
_sendPacketsFileHandles = null;
Expand Down
Loading