Skip to content

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

@vrulevskii

Description

@vrulevskii

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions