aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/loop_handlers.ezdoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-11-07 19:22:36 +0200
committerLoïc Hoguin <[email protected]>2014-11-07 19:22:36 +0200
commit8cbd8c1882e33380875f2723cad258784ba3a360 (patch)
treee04ee8ab09bffcfe8c8bab25e509b626dc42be24 /doc/src/guide/loop_handlers.ezdoc
parent903f6f4c7d7aca0432e8f8ac3c1790e82b1428fd (diff)
downloadcowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.gz
cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.bz2
cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.zip
Rename 'shutdown' close reason and tuples to 'stop'
The 'shutdown' atom has a specific meaning inside OTP. We are instead going to use 'stop' which is pretty much the equivalent of what we actually do. 'shutdown' is now reserved for future special processes implementation.
Diffstat (limited to 'doc/src/guide/loop_handlers.ezdoc')
-rw-r--r--doc/src/guide/loop_handlers.ezdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/guide/loop_handlers.ezdoc b/doc/src/guide/loop_handlers.ezdoc
index 2324cfd..879013b 100644
--- a/doc/src/guide/loop_handlers.ezdoc
+++ b/doc/src/guide/loop_handlers.ezdoc
@@ -61,7 +61,7 @@ message otherwise.
``` erlang
info({reply, Body}, Req, State) ->
Req2 = cowboy_req:reply(200, [], Body, Req),
- {shutdown, Req2, State};
+ {stop, Req2, State};
info(_Msg, Req, State) ->
{ok, Req, State, hibernate}.
```
@@ -76,7 +76,7 @@ return a tuple indicating if more messages are to be expected.
The callback may also choose to do nothing at all and just
skip the message received.
-If a reply is sent, then the `shutdown` tuple should be returned.
+If a reply is sent, then the `stop` tuple should be returned.
This will instruct Cowboy to end the request.
Otherwise an `ok` tuple should be returned.
@@ -99,7 +99,7 @@ init(Req, Opts) ->
{cowboy_loop, Req2, Opts}.
info(eof, Req, State) ->
- {shutdown, Req, State};
+ {stop, Req, State};
info({chunk, Chunk}, Req, State) ->
cowboy_req:chunk(Chunk, Req),
{ok, Req, State};