Closed mariocynicys closed 3 weeks ago
let me move this back to in progress and try to give it one more shot at finding if there is a config we can set to let hyper not shutdown our request resolver future when the client disconnects.
EDIT: Nope, there is no config option in hyper for that.
Looks like I mistakenly included this PR already in #1966 (https://github.com/KomodoPlatform/komodo-defi-framework/pull/1966/commits/5e380862902e66d9851cbca3bacff0b81f5476cb). Do we want to revert that change from dev now @shamardy? We can also keep this review and any needed changed would be applied here.
Do we want to revert that change from dev now @shamardy? We can also keep this review and any needed changed would be applied here.
No need to revert the change, I will include an entry about it in the changelog https://github.com/KomodoPlatform/komodo-defi-framework/pull/2240#issue-2581550646. I will check this PR and will close it if everything is fine. As I already reviewed https://github.com/KomodoPlatform/komodo-defi-framework/pull/1966, there should be no issues or any changes required I think.
Duplicate as it was handled in https://github.com/KomodoPlatform/komodo-defi-framework/pull/1966
when ran directly inside hyper's service function, it might get aborted mid-way when a client disconnects, leaving the future incomplete.
this is an issue as we might have some code that need to be executed atomically inside any part of the code base that could be triggered by an RPC request. if the client disconnects, such a function will abort on the next await call, leaving us with non-atomic state (e.g. partial update for a map but not its inverse).