Commits

Ginés Martínez Sánchez committed 9049634 Draft

Great day!! All sockjs tests are passed (old websocket NOT)

  • Participants
  • Parent commits e7f096b

Comments (0)

Files changed (1)

File ginsfsm/protocols/sockjs/server/c_transport_websocket.py

         )
         self.session = None
         self.active = True
-        print "YYYYYYYYYYYYYYYYYYYYYYYy"
 
     def execute(self):
-        print "XXXXXXXXXXXXXXXXXXXX"
         #self.sid = self.context.parent.re_matched_name
-        #response = self._execute()
-        return self.request.response
+        response = self._execute()
+        return response
 
     def open(self, event):
         # Create and attach to session
         self.session = RawSession(
-            self.server.get_connection_class(),
-            self.server
+            self.context.sockjs_server.get_connection_class(),
+            self.context.sockjs_server
         )
-        self.session.set_handler(self)
+        if not self.session.set_handler(self):
+            self.close()
+            return
         self.session.verify_state()
 
+        if self.session:
+            self.session.flush()
+
     def _detach(self):
         if self.session is not None:
             self.session.remove_handler(self)