GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove clearing of buffer. · bazauto/SSH.NET@ad596e8

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/Renci.SshNet
    • Session.cs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Renci.SshNet/Session.cs‎

Copy file name to clipboardExpand all lines: src/Renci.SshNet/Session.cs
-27Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,39 +1893,12 @@ private void SocketDisconnectAndDispose()
18931893
// closed by the remote host) which we'll log and ignore as it means the socket
18941894
// was already shut down
18951895
_socket.Shutdown(SocketShutdown.Send);
1896-
1897-
#if FEATURE_SOCKET_POLL
1898-
// since we've shut down the socket, there should not be any reads in progress but
1899-
// we still take a read lock to ensure IsSocketConnected continues to provide
1900-
// correct results
1901-
//
1902-
// see IsSocketConnected for details on the race condition we avoid with this lock
1903-
//
1904-
// this race condition only exists if IsSocketConnected actually uses Socket.Poll,
1905-
// and as such this read is also only required when Socket.Poll is available
1906-
lock (_socketReadLock)
1907-
{
1908-
#endif // FEATURE_SOCKET_POLL
1909-
SocketAbstraction.ClearReadBuffer(_socket);
1910-
#if FEATURE_SOCKET_POLL
1911-
}
1912-
#endif // FEATURE_SOCKET_POLL
1913-
}
1914-
catch (SshOperationTimeoutException ex)
1915-
{
1916-
// TODO: log as info or debug
1917-
DiagnosticAbstraction.Log("Time-out shutting down socket or clearing read buffer: " + ex);
19181896
}
19191897
catch (SocketException ex)
19201898
{
19211899
// TODO: log as info or debug
19221900
DiagnosticAbstraction.Log("Failure shutting down socket or clearing read buffer: " + ex);
19231901
}
1924-
catch (Exception ex)
1925-
{
1926-
// TODO: log as warning
1927-
DiagnosticAbstraction.Log("Time-out shutting down socket or clearing read buffer: " + ex);
1928-
}
19291902
}
19301903

19311904
DiagnosticAbstraction.Log(string.Format("[{0}] Disposing socket.", ToHex(SessionId)));

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.