#NEWLINE# def _manage_pings( self ) : #NEWLINE# #INDENT# if ( last_recv . keepalive_interval is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# now = time . time ( ) #NEWLINE# for ( conn_id , ( last_recv , last_ping ) ) in self . _keepalive . items ( ) : #NEWLINE# #INDENT# if ( last_recv > ( now - self . keepalive_interval ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( last_ping is None ) : #NEWLINE# #INDENT# self . send_ping ( conn_id ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( last_ping < ( now - self . keepalive_wait ) ) : #NEWLINE# #INDENT# self . packeter . link . close ( conn_id )