pushmeup icon indicating copy to clipboard operation
pushmeup copied to clipboard

"with_connection" method raises an exception: NoMethodError: undefined method `close' for nil:NilClass

Open vrulevskii opened this issue 9 years ago • 0 comments

There is a code in file https://github.com/NicosKaralis/pushmeup/tree/master/lib/pushmeup/apns/core.rb which returns the exception. It is

    rescue StandardError, Errno::EPIPE
      raise unless attempts < @retries

      @ssl.close # <== here we got an exception
      @sock.close

      attempts += 1
      retry
    end

Probably, you forget to check the condition unless @ssl.nil? Could you, please, fix that?

vrulevskii avatar Mar 11 '15 16:03 vrulevskii