Router based on host

Aa for the halt:

Halt stops the pipeline from proceeding following plugs. It does not halt the request.

So we are in pipeline land. Which clears things up.

Even though a sub phoenix router will send a response to finish the user request (after it halts), the parent plug pipeline that called the phoenix router does not receive that halt instruction; only the response.

So without the explicit halt in the router selector plug, the plug pipeline in the toplevel router will continue to run. Causing the double render error.

This is why the parent router selector plug must also send a halt.

So in lists:
Subrouter pipeline
Plug a
Plug b
Plug render < halt and return conn

Toplevel router pipeline
Plug a
Plug b
Plug RouterSelelector. < halt and return conn
Plug render # it conn reaches me I am second render