Coder Social home page Coder Social logo

Comments (8)

mouneyrac avatar mouneyrac commented on July 16, 2024

I suspect it's because I didn't have a certfile.

from airnotifier.

mouneyrac avatar mouneyrac commented on July 16, 2024

ok fixed:

    for instanceid in range(0, conns):
        if 'certfile' not in app:
            app['certfile'] = ''
        if 'keyfile' not in app:
            app['keyfile'] = ''
        apn = APNClient(app['environment'], app['certfile'], app['keyfile'], app['shortname'], instanceid)
        apnsconns[app['shortname']].append(apn)

from airnotifier.

dcai avatar dcai commented on July 16, 2024

I wrote something similar :-)

  •    for instanceid in range(0, conns):
    
  •        apn = APNClient(app['environment'], app['certfile'], app['keyfile'], app['shortname'], instanceid)
    
  •        apnsconns[app['shortname']].append(apn)
    
  •    if 'certfile' in app and 'keyfile' in app and 'shortname' in app:
    
  •        for instanceid in range(0, conns):
    
  •            apn = APNClient(app['environment'], app['certfile'], app['keyfile'], app['shortname'], instanceid)
    
  •            apnsconns[app['shortname']].append(apn)
    

if certfile and keyfile don't exist, the APNClient shouldn't be started.

from airnotifier.

mouneyrac avatar mouneyrac commented on July 16, 2024

ah I'm about to commit my fix

from airnotifier.

mouneyrac avatar mouneyrac commented on July 16, 2024

ok I let you commit yours I think it's better to not start anything

from airnotifier.

dcai avatar dcai commented on July 16, 2024

Your commit should be:

    for instanceid in range(0, conns):
        if 'certfile' in app and 'keyfile' in app:
            apn = APNClient(app['environment'], app['certfile'], app['keyfile'], app['shortname'], instanceid)
            apnsconns[app['shortname']].append(apn)

from airnotifier.

dcai avatar dcai commented on July 16, 2024

Just committed, let me know if it fails again :)

from airnotifier.

mouneyrac avatar mouneyrac commented on July 16, 2024

It works closing. Thanks dongsheng.

from airnotifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.