aboutsummaryrefslogtreecommitdiffstats
path: root/guide/http_handlers.md
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-22 02:34:18 +0100
committerLoïc Hoguin <[email protected]>2013-01-22 02:34:18 +0100
commit647e95aed157edd58c86acdd774048593eb9d039 (patch)
tree07b4877b2d59a9c694d091eaa00c03d0b1dc4c80 /guide/http_handlers.md
parent297ae32af1ad9b84558c4338f6caf82665d448e0 (diff)
downloadcowboy-647e95aed157edd58c86acdd774048593eb9d039.tar.gz
cowboy-647e95aed157edd58c86acdd774048593eb9d039.tar.bz2
cowboy-647e95aed157edd58c86acdd774048593eb9d039.zip
Replace terminate/2 with terminate/3, adding a Reason
This should have been done a *long* time ago, back when I initially added Websocket support. This is the first part of two in improving loop handler support with regards to socket closure. Reason may include: {normal, shutdown} for the most normal shutdown, {normal, timeout} for a loop handler timeout shutdown, or {error, _} if an error occured.
Diffstat (limited to 'guide/http_handlers.md')
-rw-r--r--guide/http_handlers.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guide/http_handlers.md b/guide/http_handlers.md
index ea88c79..aba0e06 100644
--- a/guide/http_handlers.md
+++ b/guide/http_handlers.md
@@ -16,7 +16,7 @@ this should be used for any initialization needs.
The second callback, `handle/2`, is where most of your code should
be. As the name explains, this is where you handle the request.
-The last callback, `terminate/2`, will be empty most of the time.
+The last callback, `terminate/3`, will be empty most of the time.
It's used for any needed cleanup. If you used the process dictionary,
timers, monitors then you most likely want to stop them in this
callback, as Cowboy might end up reusing this process for subsequent