Closed Mandur closed 2 years ago
Ownership is passed to the HttpClient and hence, the HttpClient would be responsible to dispose the handler. We can't dispose it the way we have it right now. In theory the ServiceFacadeHttpClientProvider, who owns the HttpClient would need a dispose. Since we do not have proper application lifecycle management and the ServiceFacadeHttpClientProvider
has application lifetime, it's hard to add this atm. As Mik suggested, let's fix this in general for the project and bring in DI and proper app lifecycle management that will solve this issue for us.
This was changed and we do no longer dispose it.
Since we fixed the dispose error on the existing code, we added a using here that cause the E2E to fail (see below)
Proposed course of action
let's ignore this error for now and use an injected httpclientfactory in the LBS evolution.
Expected Behavior
This call should work
Current Behavior
End to end test return error
17:32:23.661 [UDPLOG] [primary] 01F5A90000000011: failed to get join devices from api. Cannot access a disposed object.
cf https://github.com/Azure/iotedge-lorawan-starterkit/runs/3897754806?check_suite_focus=trueSteps to Reproduce
Run the E2E on dev