Explorar o código

Fixed CanRead and CanWrite in SocketAbstraction when socket is connected, and target framework does not support socket poll.

drieseng %!s(int64=9) %!d(string=hai) anos
pai
achega
a6e0e006f8
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/Renci.SshNet/Abstractions/SocketAbstraction.cs

+ 4 - 0
src/Renci.SshNet/Abstractions/SocketAbstraction.cs

@@ -16,6 +16,8 @@ namespace Renci.SshNet.Abstractions
             {
 #if FEATURE_SOCKET_POLL
                 return socket.Poll(-1, SelectMode.SelectRead) && socket.Available > 0;
+#else
+                return true;
 #endif // FEATURE_SOCKET_POLL
             }
 
@@ -29,6 +31,8 @@ namespace Renci.SshNet.Abstractions
             {
 #if FEATURE_SOCKET_POLL
                 return socket.Poll(-1, SelectMode.SelectWrite);
+#else
+                return true;
 #endif // FEATURE_SOCKET_POLL
             }