Fix node_timer bug; sometimes was not initializing watcher

This commit is contained in:
Ryan Dahl committed 2010-03-12 12:56:10 -08:00
1 parent c857d65dd3
commit b571900d9c
2 files changed
+8 -3

No files matched your search

+4 -1
View File
@@ -15,7 +15,10 @@ class Timer : ObjectWrap {
protected:
static v8::Persistent<v8::FunctionTemplate> constructor_template;
Timer () : ObjectWrap () { }
Timer () : ObjectWrap () {
// dummy timeout values
ev_timer_init(&watcher_, OnTimeout, 0., 1.);
}
~Timer();
static v8::Handle<v8::Value> New (const v8::Arguments& args);