aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext/node_grpc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/ext/node_grpc.cc')
-rw-r--r--src/node/ext/node_grpc.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc
index 848c601587..9b9eee85b7 100644
--- a/src/node/ext/node_grpc.cc
+++ b/src/node/ext/node_grpc.cc
@@ -42,6 +42,13 @@
#include "grpc/support/log.h"
#include "grpc/support/time.h"
+// TODO(murgatroid99): Remove this when the endpoint API becomes public
+#ifdef GRPC_UV
+extern "C" {
+#include "src/core/lib/iomgr/pollset_uv.h"
+}
+#endif
+
#include "call.h"
#include "call_credentials.h"
#include "channel.h"
@@ -50,6 +57,7 @@
#include "completion_queue_async_worker.h"
#include "server_credentials.h"
#include "timeval.h"
+#include "completion_queue.h"
using v8::FunctionTemplate;
using v8::Local;
@@ -428,14 +436,19 @@ void init(Local<Object> exports) {
InitWriteFlags(exports);
InitLogConstants(exports);
+#ifdef GRPC_UV
+ grpc_pollset_work_run_loop = 0;
+#endif
+
grpc::node::Call::Init(exports);
grpc::node::CallCredentials::Init(exports);
grpc::node::Channel::Init(exports);
grpc::node::ChannelCredentials::Init(exports);
grpc::node::Server::Init(exports);
- grpc::node::CompletionQueueAsyncWorker::Init(exports);
grpc::node::ServerCredentials::Init(exports);
+ grpc::node::CompletionQueueInit(exports);
+
// Attach a few utility functions directly to the module
Nan::Set(exports, Nan::New("metadataKeyIsLegal").ToLocalChecked(),
Nan::GetFunction(