From dfabadb09387a4236ee7675cd02d39b17affaf39 Mon Sep 17 00:00:00 2001 From: Waley Chen Date: Wed, 30 Mar 2016 17:36:37 -0400 Subject: SERVER-21170 NetworkInterface::startCommand should be able to reject requests due to shutdown --- src/mongo/executor/network_interface_asio.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/mongo/executor/network_interface_asio.h') diff --git a/src/mongo/executor/network_interface_asio.h b/src/mongo/executor/network_interface_asio.h index a38e778470a..62e441d7d92 100644 --- a/src/mongo/executor/network_interface_asio.h +++ b/src/mongo/executor/network_interface_asio.h @@ -130,21 +130,20 @@ public: std::string getHostName() override; void startup() override; void shutdown() override; + bool inShutdown() const override; void waitForWork() override; void waitForWorkUntil(Date_t when) override; void signalWorkAvailable() override; Date_t now() override; - void startCommand(const TaskExecutor::CallbackHandle& cbHandle, - const RemoteCommandRequest& request, - const RemoteCommandCompletionFn& onFinish) override; + Status startCommand(const TaskExecutor::CallbackHandle& cbHandle, + const RemoteCommandRequest& request, + const RemoteCommandCompletionFn& onFinish) override; void cancelCommand(const TaskExecutor::CallbackHandle& cbHandle) override; void cancelAllCommands() override; - void setAlarm(Date_t when, const stdx::function& action) override; + Status setAlarm(Date_t when, const stdx::function& action) override; bool onNetworkThread() override; - bool inShutdown() const; - private: using ResponseStatus = TaskExecutor::ResponseStatus; using NetworkInterface::RemoteCommandCompletionFn; -- cgit v1.2.1