1
0
Fork 0

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:
Lars Toenning 2021-03-11 23:52:29 +01:00 committed by James Turner
parent 509fbbcebc
commit fb8ef10918

View file

@ -56,7 +56,7 @@ bool SwiftConnection::stopServer(const SGPropertyNode* arg, SGPropertyNode* root
fgSetBool("/sim/swift/serverRunning", false);
serverRunning = false;
SwiftConnection::plug.release();
SwiftConnection::plug.reset();
return true;
}
@ -71,7 +71,7 @@ SwiftConnection::~SwiftConnection()
shutdown();
if (serverRunning) {
SwiftConnection::plug.release();
SwiftConnection::plug.reset();
}
}