diff --git a/src/eckit/thread/ThreadSingleton.h b/src/eckit/thread/ThreadSingleton.h index 18ce0f0dd..3fa317e23 100644 --- a/src/eckit/thread/ThreadSingleton.h +++ b/src/eckit/thread/ThreadSingleton.h @@ -83,6 +83,7 @@ ThreadSingleton::~ThreadSingleton() { T* value = (T*)::pthread_getspecific(key_); if (value) { ::pthread_key_delete(key_); + once_ = PTHREAD_ONCE_INIT; delete value; } }