@@ -42,7 +42,8 @@ def prepare(self):
4242
4343 # TODO: remove this once globalawareness is implemented
4444 if self .room_id == "JupyterLab:globalAwareness" :
45- raise HTTPError (404 )
45+ self .close (1011 )
46+ return
4647
4748 # Verify the file ID contained in the room ID points to a valid file.
4849 fileid = self .room_id .split (":" )[- 1 ]
@@ -52,6 +53,11 @@ def prepare(self):
5253
5354
5455 def open (self , * _ , ** __ ):
56+ # TODO: remove this later
57+ if self .room_id == "JupyterLab:globalAwareness" :
58+ self .close (1011 )
59+ return
60+
5561 # Create the YRoom
5662 yroom = self .yroom_manager .get_room (self .room_id )
5763 if not yroom :
@@ -63,10 +69,18 @@ def open(self, *_, **__):
6369
6470
6571 def on_message (self , message : bytes ):
72+ # TODO: remove this later
73+ if self .room_id == "JupyterLab:globalAwareness" :
74+ return
75+
6676 # Route all messages to the YRoom for processing
6777 self .yroom .add_message (self .client_id , message )
6878
6979
7080 def on_close (self ):
71- self .log .info ("WEBSOCKET CLOSED" )
81+ # TODO: remove this later
82+ if self .room_id == "JupyterLab:globalAwareness" :
83+ return
84+
85+ self .log .info (f"Closed Websocket to client '{ self .client_id } '." )
7286 self .yroom .clients .remove (self .client_id )
0 commit comments