We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31b75d7 + 843d063 commit ea12033Copy full SHA for ea12033
packages/grpc-native-core/ext/server.cc
@@ -312,6 +312,9 @@ NAN_METHOD(Server::TryShutdown) {
312
if (!HasInstance(info.This())) {
313
return Nan::ThrowTypeError("tryShutdown can only be called on a Server");
314
}
315
+ if (!info[0]->IsFunction()) {
316
+ return Nan::ThrowError("tryShutdown's argument must be a callback");
317
+ }
318
Server *server = ObjectWrap::Unwrap<Server>(info.This());
319
if (server->wrapped_server == NULL) {
320
// Server is already shut down. Call callback immediately.
0 commit comments