SocketError:Socket被远程关闭

时间:2017-12-31 19:20:17

标签: ruby-on-rails ruby sockets push-notification

在prnotic gem中获取错误

connection = Apnotic::Connection.new(cert_path: Rails.public_path + "dev_ck.pem")

  # create a notification for a specific device token
  token = "5F2822CBF606487BA11CA364C4B35893A639..."
  notification       = Apnotic::Notification.new(token)
  notification.alert = "Notification from Apnotic!"
  notification.sound = ''
  notification.badge = 1
  notification.topic = 'testing'
  # send (this is a blocking call)
  response = connection.push(notification)

它出现套接字错误

0 个答案:

没有答案