amenzhinsky / iothub

Azure IoT Hub SDK for Golang
MIT License
53 stars 57 forks source link

Reconnecting with new credentials #73

Closed aka-mj closed 1 year ago

aka-mj commented 1 year ago

I'm looking to see if it's possible to disconnect/reconnect with new credentials? For a long running connection my x509 cert may expire and my program is able to acquire a new one but then I'll need to restart my connection with the new cert. Wondering if this is possible without creating a new client. So far I'm had no luck getting this to work. I'm currently trying to call Close() on the transport and then Connect() passing it the new credentials. After re-connection nothing is making it to the cloud.

aka-mj commented 1 year ago

Got this working and pushed the changes to my fork.