Просмотр исходного кода

Add two missing terminate reasons to http/loop handlers specs

Loïc Hoguin 12 лет назад
Родитель
Сommit
bf2b8181cc
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      src/cowboy_http_handler.erl
  2. 2 0
      src/cowboy_loop_handler.erl

+ 2 - 0
src/cowboy_http_handler.erl

@@ -35,6 +35,8 @@
 -type state() :: any().
 -type terminate_reason() :: {normal, shutdown}
 	| {normal, timeout} %% Only occurs in loop handlers.
+	| {error, closed} %% Only occurs in loop handlers.
+	| {error, overflow} %% Only occurs in loop handlers.
 	| {error, atom()}.
 
 -callback init({atom(), http}, Req, opts())

+ 2 - 0
src/cowboy_loop_handler.erl

@@ -41,6 +41,8 @@
 -type state() :: any().
 -type terminate_reason() :: {normal, shutdown}
 	| {normal, timeout}
+	| {error, closed}
+	| {error, overflow}
 	| {error, atom()}.
 
 -callback init({atom(), http}, Req, opts())