I just cracked a bug in my code which was stopping me using async when placing bets. async usage is not in the c# sample code by the way. It is really useful when placing bets in running horse markets.. The bug was that when placing a bet without async a BetId is returned. I was using this BetId later in the code.
When placing bets using async the return value for betId is null. This created an exception which I was not handling.
Im still not sure why but the knock on effect was that the system kept placing the same bet over and over until I ran out of cash. I remember this from 2016 and since that happened I stopped using async.
Finally reexamined it today and saw the problem.
Still nervous though.
When placing bets using async the return value for betId is null. This created an exception which I was not handling.
Im still not sure why but the knock on effect was that the system kept placing the same bet over and over until I ran out of cash. I remember this from 2016 and since that happened I stopped using async.
Finally reexamined it today and saw the problem.
Still nervous though.


Comment