Commit e789e704 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/js-drone: fix Pub/Sub server exit

Make sure to stop Pub/Sub server before stopping MavSDK thread
parent a14f1408
......@@ -10,8 +10,8 @@ parts = qjs-wrapper
recipe = slapos.recipe.cmmi
shared = true
configure-command = true
url = https://lab.nexedi.com/nexedi/qjs-wrapper/-/archive/v1.1/qjs-wrapper-v1.1.tar.gz
md5sum = 6a22c65c78f54f218c85334580bfb522
url = https://lab.nexedi.com/nexedi/qjs-wrapper/-/archive/v1.2/qjs-wrapper-v1.2.tar.gz
md5sum = e335fc2251610c09dde3e74787317d98
environment =
C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include
CPLUS_INCLUDE_PATH=include:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
......
......@@ -26,7 +26,7 @@ md5sum = 1ff50063f5a54712a0bc0ff38fa74630
[main]
filename = main.js
md5sum = c381d2a6c4008a9ef69dd176d3a06028
md5sum = 5f66cdcc84945749e1f8f7b017e70fc2
[pubsub]
filename = pubsub.js
......
......@@ -47,10 +47,10 @@ import { open, exit } from "std";
}
function quit(is_a_drone, exit_code) {
stopPubsub();
if (is_a_drone) {
stop();
}
stopPubsub();
exit(exit_code);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment