Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Get the websocket return value to enforce #outh{doclose=false} using …

…the {connection, erase} header.
  • Loading branch information...
commit da8ebc674f02af2507d4edac5faebdd92707bb2b 1 parent 7fdc54a
@davide davide authored
Showing with 1 addition and 2 deletions.
  1. +1 −0  src/yaws_server.erl
  2. +0 −2  src/yaws_websockets.erl
View
1  src/yaws_server.erl
@@ -2779,6 +2779,7 @@ handle_out_reply({streamcontent_from_pid, MimeType, Pid},
handle_out_reply({websocket, _OwnerPid, _SocketMode}=Reply,
_LineNo,_YawsFile, _UT, _ARG) ->
+ yaws:accumulate_header({connection, erase}),
Reply;
handle_out_reply({header, H}, _LineNo, _YawsFile, _UT, _ARG) ->
View
2  src/yaws_websockets.erl
@@ -49,8 +49,6 @@ handshake(Arg, ContentPid, SocketMode) ->
end,
case TakeOverResult of
ok ->
- %% Make sure that Yaws doesn't close the socket!
- put(outh, (get(outh))#outh{doclose = false}),
ContentPid ! {ok, CliSock};
{error, Reason} ->
ContentPid ! discard,
Please sign in to comment.
Something went wrong with that request. Please try again.