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

Fix a websocket test handler that was throwing an unwanted error

The test still worked because we expect the websocket connection
to fail, but it didn't fail exactly the way we wanted it to.
Loïc Hoguin 13 лет назад
Родитель
Сommit
ad87fee0af
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      test/websocket_handler_init_shutdown.erl

+ 1 - 1
test/websocket_handler_init_shutdown.erl

@@ -17,7 +17,7 @@ terminate(_Req, _State) ->
 	exit(badarg).
 
 websocket_init(_TransportName, Req, _Opts) ->
-	Req2 = cowboy_http_req:reply(403, Req),
+	{ok, Req2} = cowboy_http_req:reply(403, Req),
 	{shutdown, Req2}.
 
 websocket_handle(_Frame, _Req, _State) ->