Reset notifier in every rack request.
Refactor Rails middleware.