Bitmex.NET icon indicating copy to clipboard operation
Bitmex.NET copied to clipboard

Randomly closes down without any exception

Open Ajes1337 opened this issue 5 years ago • 2 comments

The example program randomly closes down twice for me, each time within 15 hours..

There is no error message or log..

I have another program feeding it small not-often tcp-packets to when it should make an order..

any idea what is causing this..?

Ajes1337 avatar Aug 07 '18 07:08 Ajes1337

@Ajes1337 no idea, unfortunately, I will make some additional logging in the example to check what's going on (such a global error handling). I will be able to add it only within next week so that if you could do it by yourself it would be much appreciated.

thanks,

semashkinvg avatar Aug 07 '18 08:08 semashkinvg

It feels like I am humbling with the same problem. For me it worked to "syncronize" the SendAsync call in proxy class.

From:

var response = await _httpClient.SendAsync(request);
var responseString = await response.Content.ReadAsStringAsync();

To:

var response = _httpClient.SendAsync(request).Result; // will give me a exception I can work on
var responseString = await response.Content.ReadAsStringAsync();

It's a workaround, not a fix. Something is happening to the exception while passing it to the calling point. I cannot see the bug, yet. Methods are returning Task not void.

devbar avatar Feb 01 '19 16:02 devbar