websocket first version works
[src/app-framework-binder.git] / src / afb-hsrv.c
index 2c29439..977aea6 100644 (file)
@@ -151,12 +151,9 @@ static int afb_hreq_websocket_switch(struct afb_hreq *hreq, void *data)
                return 0;
 
        if (!later) {
-               struct afb_websock *ws = afb_websock_create(hreq->connection);
-               if (ws == NULL) {
-                       /* TODO */
-               } else {
-                       /* TODO */
-               }
+               struct afb_websock *ws = afb_websock_create(hreq);
+               if (ws != NULL)
+                       hreq->upgrade = 1;
        }
        return 1;
 }