[fabbione/kronosnet] f12428: Fix shutdown race conditions between locks/threads...