Closed ark3 closed 7 years ago
The assertion is not incorrect. That it sometimes fails is a symptom of the fact that the proper cleanup is not being performed by ExtAuth::onDestroy()
.
From include/envoy/http/filter.h:
/**
* This routine is called prior to a filter being destroyed. This may happen after normal stream
* finish (both downstream and upstream) or due to reset. Every filter is responsible for making
* sure that any async events are cleaned up in the context of this routine. This includes timers,
* network calls, etc. The reason there is an onDestroy() method vs. doing this type of cleanup
* in the destructor is due to the deferred deletion model that Envoy uses to avoid stack unwind
* complications.
*/
Updating the issue title.
It appears this assertion on line 15 of extauth.cc is incorrect:
We should rethink it and probably remove it.