NASA-AMMOS / AIT-DSN

MIT License
19 stars 10 forks source link

Fix Issue #124– Check if SLE instance is connected to the DSN before sending heartbeats #126

Closed kmarwah closed 3 years ago

kmarwah commented 3 years ago

Fix Issue #124 by spawning the connection handler gevent process after the DSN socket is created and the object is connected to the DSN. Prior to this bug fix, users receive an error stating that "class does not have attribute '_socket'" when an SLE object is instantiated but not immediately connected to the DSN (i.e. .connect() is not run immediately after instantiating the object). This is due to the connection handler function, which sends heartbeats to the DSN, being spawned as a gevent process in __init__.

kmarwah commented 3 years ago

@MJJoyce fixed my commit and PR to be in line with the contributing guide

MJJoyce commented 3 years ago

:+1: looks good. Thanks!