    # File lib/phusion_passenger/abstract_request_handler.rb, line 220
            def cleanup
                    if @main_loop_thread
                            @main_loop_thread_lock.synchronize do
                                    @graceful_termination_pipe[1].close rescue nil
                            end
                            @main_loop_thread.join
                    end
                    @server_sockets.each_value do |value|
                            address, type, socket = value
                            socket.close rescue nil
                            if type == 'unix'
                                    File.unlink(address) rescue nil
                            end
                    end
                    @owner_pipe.close rescue nil
            end