m3047 / rear_view_rpz

Turn your recursive DNS (BIND) server into a network investigation enabler with DnsTap and RPZ. Make PTR recs great again!
Apache License 2.0
12 stars 2 forks source link

Tasks are WeakRefs #5

Closed m3047 closed 1 year ago

m3047 commented 1 year ago

It wasn't documented (well) in Python 3.6 but the event loop keeps track of Tasks using a weakref.WeakSet. Theoretically this can cause tasks to mysteriously disappear during garbage collection.

So, special measures need to be taken to keep a regular reference to the task around while a request is being serviced.

Affected items are:

m3047 commented 1 year ago

Done at d9053ee251bb112374569b87188eb84b9bbcdd5c