#NEWLINE# def handle_periodic( self ) : #NEWLINE# #INDENT# if sock . _closed : #NEWLINE# #INDENT# if self . _server_socket : #NEWLINE# #INDENT# self . _server_socket . close ( ) #NEWLINE# self . _server_socket = None #NEWLINE# for sock in self . _sockets : #NEWLINE# #INDENT# sock . close ( ) #NEWLINE# #UNINDENT# logging . info ( 'closed UDP port %d' , self . _listen_port ) #NEWLINE# #UNINDENT# #UNINDENT# self . _cache . sweep ( ) #NEWLINE# self . _client_fd_to_server_addr . sweep ( )