Execute view.done on the next loop, or else client listeners are run after close
Set href on res.locals - setting on global settings fails with reentrant requests