#NEWLINE# def peer_subscribe( self , topic_name , topic_publish , peer_publish ) : #NEWLINE# #INDENT# " Called whenever there's a new subscription.\n\n        If we're still inside the subscription setup window, then we publish\n        any buffered messages to the peer.\n\n        We also check if we're timed out, but if we are we don't detach (due\n        to threading complications), we just don't propagate buffered messages\n        " #NEWLINE# if ( not self . timed_out ( ) ) : #NEWLINE# #INDENT# self . lock . acquire ( ) #NEWLINE# msgs = copy ( msg . msg_buffer ) #NEWLINE# self . lock . release ( ) #NEWLINE# for msg in msgs : #NEWLINE# #INDENT# peer_publish ( msg )