You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a WireGuard instance in a function will keep pipes open, thus preventing garbage collection and filling up file descriptors until they run out and the product throws OSError.
Workaround: declare a single WireGuard object per project, using a wrapper to implement it as singleton (either create a new object or return the same one if it has already been instantiated).
Proposed fix: make the WireGuard class a singleton, or make it so it will be garbage collected.
I can make a PR with the singleton implementation if you'd like.
The text was updated successfully, but these errors were encountered:
Creating a
WireGuard
instance in a function will keep pipes open, thus preventing garbage collection and filling up file descriptors until they run out and the product throws OSError.Workaround: declare a single WireGuard object per project, using a wrapper to implement it as singleton (either create a new object or return the same one if it has already been instantiated).
Proposed fix: make the
WireGuard
class a singleton, or make it so it will be garbage collected.I can make a PR with the singleton implementation if you'd like.
The text was updated successfully, but these errors were encountered: