Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when IncrAsync #59

Open
notabdc opened this issue Feb 29, 2020 · 0 comments
Open

Exception when IncrAsync #59

notabdc opened this issue Feb 29, 2020 · 0 comments

Comments

@notabdc
Copy link

notabdc commented Feb 29, 2020

I write test codes following the example code in readme.md:
using (var redis = new RedisClient("someIP"))
{
// fire-and-forget: results are not captured
for (int i = 0; i < 5000; i++)
{
redis.IncrAsync("test1");
}
...
}
when i=0 it's fine,
when i=1, I got exception:
在已经完成任务后,尝试将任务转换为最终状态。(try transfer task to complete status when task is already completed.)
the stack is:

csredis.dll!CSRedis.Internal.IO.AsyncConnector.ConnectAsync() Line 51 C#
csredis.dll!CSRedis.Internal.IO.AsyncConnector.CallAsync(CSRedis.RedisCommand command) Line 73 C#
csredis.dll!CSRedis.Internal.RedisConnector.CallAsync(CSRedis.RedisCommand command) Line 97 C#
csredis.dll!CSRedis.RedisClient.WriteAsync(CSRedis.RedisCommand command) Line 34 C#
csredis.dll!CSRedis.RedisClient.IncrAsync(string key) Line 1530 C#
TestApp.exe!TestApp.Program.Main(string[] args) Line 21 C#
the code throw excetion is:
public Task ConnectAsync()
{
if (_redisSocket.Connected)
=> _connectionTaskSource.SetResult(true);

do I missunstand something about the async task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant