question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AddOrUpdateAsync not returning

See original GitHub issue

I have the following code where I am trying to retrieve a list member, make some changes to the MergeFields, and then update their record on Mailchimp. I’ve simplified the code for readability.

var mailChimp = new MailChimpManager();
var listMember = mailChimp.Members.GetAsync(listId, email).Result;
listMember.MergeFields["MYFIELD"] = myFieldNewValue;
var transmitResult = mailChimp.Members.AddOrUpdateAsync(listId, listMember).Result;
return transmitResult;

When I call the AddOrUpdateAsync function and wait for the result, nothing ever comes back. It just sits on that line within the debugger. I’m assuming it will time-out after some point, but I’ve waited several minutes and it just sits there.

Any idea why that may be?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brandonseydelcommented, Nov 17, 2016

Good find I altered them all…

0reactions
wc-matteocommented, Nov 16, 2016

I think the issue is that this awaited call inside PutAsJsonAsync() has no .ConfigureAwait(false) specified. This would cause a deadlock.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What happened to AddOrUpdate in EF 7 / Core?
The Update method normally marks the entity for update, not insert. However, if the entity has a auto-generated key, and no key value...
Read more >
IReliableDictionary<TKey,TValue>.AddOrUpdateAsync ...
Adds a key/value pair to the Reliable Dictionary if the key does not already ... Returns. Task<TValue>. Task that represents the asynchronous add...
Read more >
Entity Framework: AddOrUpdate Can Be a Destructive Operation
Returning the Customer to the view and using hidden fields to store the values we don't want to allow to be editable, then...
Read more >
Method AddOrUpdateAsync | ScaleOut Client Library for .NET
An existing object was successfully updated in the ScaleOut service. This operation does not use locking and will bypass locks on objects held...
Read more >
Concurrent non-blocking update of cached list of on-line ...
I'll try to propagate AgentId like structs to EF using [ComplexType]. Can you explain why do we need to put null into dictionary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found