diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-11-04 16:14:50 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-11-04 16:18:15 +0100 |
| commit | 06037f3f46463e65ab74e0f34ba5f7a869d053fd (patch) | |
| tree | 398bb1aa204787adab42b54dc5ccfe982d5c6419 /src/init.cpp | |
| parent | build: Fix "too many arguments" error (diff) | |
| parent | Add "warmup mode" for RPC server. (diff) | |
| download | discoin-06037f3f46463e65ab74e0f34ba5f7a869d053fd.tar.xz discoin-06037f3f46463e65ab74e0f34ba5f7a869d053fd.zip | |
Merge pull request #5007
af82884 Add "warmup mode" for RPC server. (Daniel Kraft)
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index d622af69e..fe58c68fd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -752,6 +752,17 @@ bool AppInit2(boost::thread_group& threadGroup) threadGroup.create_thread(&ThreadScriptCheck); } + /* Start the RPC server already. It will be started in "warmup" mode + * and not really process calls already (but it will signify connections + * that the server is there and will be ready later). Warmup mode will + * be disabled when initialisation is finished. + */ + if (fServer) + { + uiInterface.InitMessage.connect(SetRPCWarmupStatus); + StartRPCThreads(); + } + int64_t nStart; // ********************************************************* Step 5: verify wallet database integrity @@ -1248,8 +1259,6 @@ bool AppInit2(boost::thread_group& threadGroup) #endif StartNode(threadGroup); - if (fServer) - StartRPCThreads(); #ifdef ENABLE_WALLET // Generate coins in the background @@ -1259,6 +1268,7 @@ bool AppInit2(boost::thread_group& threadGroup) // ********************************************************* Step 11: finished + SetRPCWarmupFinished(); uiInterface.InitMessage(_("Done loading")); #ifdef ENABLE_WALLET |