From e30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 10 Aug 2016 17:15:02 +0200 Subject: Make reply functions return Req --- test/handlers/loop_handler_body_h.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/handlers/loop_handler_body_h.erl') diff --git a/test/handlers/loop_handler_body_h.erl b/test/handlers/loop_handler_body_h.erl index 38ba2c0..e0ea41b 100644 --- a/test/handlers/loop_handler_body_h.erl +++ b/test/handlers/loop_handler_body_h.erl @@ -13,11 +13,10 @@ init(Req, _) -> self() ! timeout, {cowboy_loop, Req, undefined, 5000, hibernate}. -info(timeout, Req, State) -> - {ok, Body, Req2} = cowboy_req:read_body(Req), +info(timeout, Req0, State) -> + {ok, Body, Req} = cowboy_req:read_body(Req0), 100000 = byte_size(Body), - cowboy_req:reply(200, Req2), - {stop, Req, State}. + {stop, cowboy_req:reply(200, Req), State}. terminate(stop, _, _) -> ok. -- cgit v1.2.3