Skip to content

Commit 5878338

Browse files
authored
Fix outdated comments on SocketAsyncEventArgs.Windows (#119628)
1 parent 094da3a commit 5878338

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Windows.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,18 +695,17 @@ internal unsafe SocketError DoOperationSendPackets(Socket socket, SafeSocketHand
695695
{
696696
if (spe?.FilePath != null)
697697
{
698-
// Create a FileStream to open the file.
698+
// Open the file and get its handle.
699699
_sendPacketsFileHandles[index] =
700700
File.OpenHandle(spe.FilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
701701

702-
// Get the file handle from the stream.
703702
index++;
704703
}
705704
}
706705
}
707706
catch
708707
{
709-
// Got an exception opening a file - close any open streams, then throw.
708+
// Got an exception opening a file - close any open files, then throw.
710709
for (int i = index - 1; i >= 0; i--)
711710
_sendPacketsFileHandles[i].Dispose();
712711
_sendPacketsFileHandles = null;

0 commit comments

Comments
 (0)