0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Fix a confusing code snippet

Reported by Jordan Chaitin.
This commit is contained in:
Loïc Hoguin 2017-06-14 15:07:12 +02:00
parent ec00e3d60e
commit 47eaadb209
No known key found for this signature in database
GPG key ID: 71366FF21851DF03

View file

@ -216,6 +216,7 @@ list used by routing. This will apply to all new connections accepted
by the listener:
[source,erlang]
cowboy:set_env(my_http_listener, dispatch, cowboy_router:compile(Dispatch)).
Dispatch = cowboy_router:compile(Routes),
cowboy:set_env(my_http_listener, dispatch, Dispatch).
Note that you need to compile the routes again before updating.