#NEWLINE# def handle( self ) : #NEWLINE# #INDENT# self . log . debug ( 'handle' ) #NEWLINE# self . request . settimeout ( None ) #NEWLINE# while True : #NEWLINE# #INDENT# if ( not self . handshake_done ) : #NEWLINE# #INDENT# self . handshake ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not self . read_next_message ( ) ) : #NEWLINE# #INDENT# k = get_instance_key ( self ) #NEWLINE# clients [ k ] . websockets . remove ( self ) #NEWLINE# self . handshake_done = False #NEWLINE# self . log . debug ( 'ws ending websocket service' ) #NEWLINE# break