MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / Stop

Method Stop

Source/URLab/Private/Bridge/BridgeServer.cpp:104–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void UURLabBridgeServer::Stop()
105{
106 // Drain before tearing transports down so blocking handlers see the
107 // flag on their next 50ms tick and return `shutting_down` instead of
108 // pinning the worker thread.
109 if (Dispatcher.IsValid())
110 {
111 Dispatcher->SetDraining(true);
112 }
113
114 for (const TObjectPtr<UURLabRpcTransport>& T : RpcTransports)
115 {
116 if (T)
117 T->TransportShutdown();
118 }
119 RpcTransports.Reset();
120
121 if (!Dispatcher.IsValid())
122 return;
123 Dispatcher->Shutdown();
124 Dispatcher.Reset();
125 ActiveManager.Reset();
126}
127
128void UURLabBridgeServer::RegisterManager(AAMjManager* InManager)
129{

Callers 3

StopServerMethod · 0.45
RunTestMethod · 0.45
CleanupMethod · 0.45

Calls 4

IsValidMethod · 0.80
TransportShutdownMethod · 0.45
ResetMethod · 0.45
ShutdownMethod · 0.45

Tested by 2

RunTestMethod · 0.36
CleanupMethod · 0.36