Permalink
Browse files

Fix a potential WebSocket bug (subuser context inconsistency)

  • Loading branch information...
1 parent f7f59c3 commit f0cac704097a3237a49ec6800e069b0b10a32e0c @paraboul paraboul committed May 2, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/parser.c
View
@@ -47,7 +47,13 @@ static void parser_ready_websocket(ape_parser *websocket_parser, acetables *g_ap
{
ape_socket *co = websocket_parser->socket;
+ subuser *tmp = co->attach;
+
co->attach = checkrecv_websocket(co, g_ape);
+
+ if (tmp != NULL && co->attach != tmp) {
+ tmp->state = ADIED;
+ }
}
ape_parser parser_init_http(ape_socket *co)

0 comments on commit f0cac70

Please sign in to comment.