Reset unique ptr to delete object
Previously multiple start/stops of the swift-connection failed because the CPlugin object was not deleted
This commit is contained in:
parent
509fbbcebc
commit
fb8ef10918
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ bool SwiftConnection::stopServer(const SGPropertyNode* arg, SGPropertyNode* root
|
||||||
fgSetBool("/sim/swift/serverRunning", false);
|
fgSetBool("/sim/swift/serverRunning", false);
|
||||||
serverRunning = false;
|
serverRunning = false;
|
||||||
|
|
||||||
SwiftConnection::plug.release();
|
SwiftConnection::plug.reset();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ SwiftConnection::~SwiftConnection()
|
||||||
shutdown();
|
shutdown();
|
||||||
|
|
||||||
if (serverRunning) {
|
if (serverRunning) {
|
||||||
SwiftConnection::plug.release();
|
SwiftConnection::plug.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue