var connStr = "example.com:6380,password=pwd,ssl=True,testcluster=false"
var conn = new CSRedis.CSRedisClient(connStr)
await conn.SetAsync("Name", "Val");//这一步会等待一段时间,然后报错超时
System.IO.IOException
HResult=0x80131620
Message=Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Source=System.Net.Sockets
StackTrace:
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Security.SslStreamInternal.FillBufferAsync[TReadAdapter](TReadAdapter adapter, Int32 minSize)
at System.Net.Security.SslStreamInternal.d__341.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ValueTaskAwaiter1.GetResult()
at System.Net.Security.SslStreamInternal.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.ReadByteSlow()
at System.IO.BufferedStream.ReadByte()
at CSRedis.Internal.IO.RedisReader.ReadType() in C:\Users\Itokt\Downloads\Compressed\csredis-master\csredis-master\src\Internal\IO\RedisReader.cs:line 21
Inner Exception 1:
SocketException: A connection attempt failed because the connected party did not properly >respond after a period of time, or established connection failed because connected host has >failed to respond
其中 await conn.SetAsync("Name", "Val"); 这一步会等待一段时间,然后报错超时。
但是连接本地:127.0.0.1:6379 可以正常使用的。 同步方法可以正常使用。