microsoft / reverse-proxy

A toolkit for developing high-performance HTTP reverse proxy applications.

Home Page:https://microsoft.github.io/reverse-proxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HttpSysDelegator - AddOrUpdateRules fails to add rule due to bug with WeakReference/GC

NGloreous opened this issue · comments

Describe the bug

This unexpected condition can be hit if a GC occurs after a new DelegationQueue is initialized but before it's pulled back out of the WeakReference.

That is because even though the queue variable is still used after here the actual object isn't necessarily referenced, so the JIT/GC considers it fine to clean up the object.