Ticket #20: ping_fix.patch

File ping_fix.patch, 0.8 kB (added by nex, 3 years ago)

fix

  • lib/rbot/ircbot.rb

    old new  
    355355      end 
    356356 
    357357      puts "disconnected" 
     358      @last_ping = nil 
     359      @timer.remove @pong_timer unless @pong_timer.nil? 
     360      @timer.remove @ping_timer unless @ping_timer.nil? 
    358361      @channels.clear 
    359362      @socket.clearq 
    360363 
     
    569572  # before the next one come around.. 
    570573  def start_server_pings 
    571574    # stop existing timers if running 
     575    @last_ping = nil 
    572576    unless @ping_timer.nil? 
    573577      @timer.remove @ping_timer 
    574578      @ping_timer = nil 
     
    593597          rescue 
    594598            debug "couldn't shutdown connection (already shutdown?)" 
    595599          end 
     600          @last_ping = nil 
    596601        end 
    597602      end 
    598603    }