MCPcopy Create free account
hub / github.com/YtFlow/Maple / StopLeaf

Method StopLeaf

Maple.Task/VpnPlugin.cpp:179–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177 );
178 }
179 void VpnPlugin::StopLeaf() {
180 m_backTransport = nullptr;
181
182 auto leafHandle = m_leaf;
183 if (leafHandle != nullptr) {
184 uwp_stop_leaf(leafHandle);
185 m_leaf = nullptr;
186 }
187
188 auto netStackHandle = m_netStackHandle;
189 if (netStackHandle != nullptr) {
190 const auto context = netstack_release(netStackHandle);
191 m_netStackHandle = nullptr;
192 // Release context, which is an ABI of IOutputStream
193 IInspectable obj{};
194 winrt::attach_abi(obj, context);
195 m_netStackHandle = nullptr;
196 }
197 }
198 void VpnPlugin::Disconnect(VpnChannel const& channel)
199 {
200 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected