diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 596fcc8356d500..29bd64f2c5e3fe 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -563,7 +563,6 @@ AsyncWrap::AsyncWrap(Environment* env, CHECK_NE(provider, PROVIDER_NONE); CHECK_GE(object->InternalFieldCount(), 1); - async_id_ = -1; // Use AsyncReset() call to execute the init() callbacks. AsyncReset(execution_async_id, silent); } diff --git a/src/async_wrap.h b/src/async_wrap.h index 360380afc3459b..e3d5748bbc6077 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -200,7 +200,7 @@ class AsyncWrap : public BaseObject { inline AsyncWrap(); const ProviderType provider_type_; // Because the values may be Reset(), cannot be made const. - double async_id_; + double async_id_ = -1; double trigger_async_id_; };