bytedreamer / OSDP.Net

A .NET Core control panel implementation of the Open Supervised Device Protocol(OSDP)
Apache License 2.0
47 stars 19 forks source link

fix: Wrong exception if connection is broken during file transfer. #96

Closed hallsbyra closed 2 years ago

hallsbyra commented 2 years ago

If a connection is lost during a file transfer (e.g. serial port is disconnected), the transfer will fail and an exception is thrown. This is expected, naturally.

However, the connection is also removed from _buses so the finally block will throw "The given key 'xxx' was not present in the dictionary.' and the "real" exception is lost.