aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers
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 /test/handlers
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 'test/handlers')
-rw-r--r--test/handlers/long_polling_h.erl4
-rw-r--r--test/handlers/loop_handler_body_h.erl4
-rw-r--r--test/handlers/loop_handler_timeout_h.erl2
3 files changed, 5 insertions, 5 deletions
diff --git a/test/handlers/long_polling_h.erl b/test/handlers/long_polling_h.erl
index 20fe7ee..4f8e23f 100644
--- a/test/handlers/long_polling_h.erl
+++ b/test/handlers/long_polling_h.erl
@@ -14,12 +14,12 @@ init(Req, _) ->
{cowboy_loop, Req, 2, 5000, hibernate}.
info(timeout, Req, 0) ->
- {shutdown, cowboy_req:reply(102, Req), 0};
+ {stop, cowboy_req:reply(102, Req), 0};
info(timeout, Req, Count) ->
erlang:send_after(200, self(), timeout),
{ok, Req, Count - 1, hibernate}.
-terminate(shutdown, _, 0) ->
+terminate(stop, _, 0) ->
ok;
terminate({error, overflow}, _, _) ->
ok.
diff --git a/test/handlers/loop_handler_body_h.erl b/test/handlers/loop_handler_body_h.erl
index 096fb3d..0d4fd4d 100644
--- a/test/handlers/loop_handler_body_h.erl
+++ b/test/handlers/loop_handler_body_h.erl
@@ -16,7 +16,7 @@ init(Req, _) ->
info(timeout, Req, State) ->
{ok, Body, Req2} = cowboy_req:body(Req),
100000 = byte_size(Body),
- {shutdown, cowboy_req:reply(200, Req2), State}.
+ {stop, cowboy_req:reply(200, Req2), State}.
-terminate(shutdown, _, _) ->
+terminate(stop, _, _) ->
ok.
diff --git a/test/handlers/loop_handler_timeout_h.erl b/test/handlers/loop_handler_timeout_h.erl
index a1bfa51..6502a3a 100644
--- a/test/handlers/loop_handler_timeout_h.erl
+++ b/test/handlers/loop_handler_timeout_h.erl
@@ -15,7 +15,7 @@ init(Req, _) ->
{cowboy_loop, Req, undefined, 200, hibernate}.
info(timeout, Req, State) ->
- {shutdown, cowboy_req:reply(500, Req), State}.
+ {stop, cowboy_req:reply(500, Req), State}.
terminate(timeout, _, _) ->
ok.