aws / aws-iot-device-sdk-python

SDK for connecting to AWS IoT from a device using Python.
Apache License 2.0
683 stars 426 forks source link

Init offline request queue exceptions on raise #283

Closed cph-w closed 3 years ago

cph-w commented 3 years ago

This causes the exception stack trace to be added to the instance every time the exception is raised, increasing memory usage and causing a memory leak.

The state to exception map is preserved without initialising the exceptions, instead they are initialised when needed to be raised.

Fixes: 333ffdb

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.