File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,18 @@ struct TemplatedApp {
576576 return std::move (static_cast <BuilderPatternReturnType &&>(*this ));
577577 }
578578
579+ BuilderPatternReturnType &&removeChildApp(BuilderPatternReturnType *app) {
580+ /* Remove this app from httpContextData list over child apps and reset round robin */
581+ auto &childApps = httpContext->getSocketContextData ()->childApps ;
582+ childApps.erase (
583+ std::remove (childApps.begin (), childApps.end (), (void *) app),
584+ childApps.end ()
585+ );
586+ httpContext->getSocketContextData ()->roundRobin = 0 ;
587+
588+ return std::move (static_cast <BuilderPatternReturnType &&>(*this ));
589+ }
590+
579591 BuilderPatternReturnType &&addChildApp(BuilderPatternReturnType *app) {
580592 /* Add this app to httpContextData list over child apps and set onPreOpen */
581593 httpContext->getSocketContextData ()->childApps .push_back ((void *) app);
You can’t perform that action at this time.
0 commit comments