Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
views: fix handling of
View.is_daemon
This patch fixes a regression, introduced in: c325458 ("views: add daemonizing support for short running views") c325458 changed the checks, if a view runtime should be removed from the server, to make short running deamon-views possible. When `View.STOP_DAEMON_WHEN_VIEW_FINISHES` was set to `False` and `View.is_daemon` to `True`, the runtime did not get removed from the server, when the user closed the tab, and got reconnected, to the same runtime, when reopening the tab. When `View.STOP_DAEMON_WHEN_VIEW_FINISHES` was set to `True`, which is the default, and `View.is_daemon` to `True`, the view should be removed from the server, when it finishes, and the tab got closed, but instead the runtime remained on the server, but was not reconnected when reopening the tab. That meant that the server created a new view runtime on every access of a page, and did neither reuse or close it, so they built up indefinitely. This patch fixes this issue, by adding a check to `ViewRuntime.remove_connection`, if `STOP_DAEMON_WHEN_VIEW_FINISHES` is set, when the last connection to the runtime gets closed. In this case the runtime gets removed from the server. Signed-off-by: Florian Scherf <[email protected]>
- Loading branch information