Skip to content

Commit beac693

Browse files
committed
Exit on disconnect.
1 parent 0b2f631 commit beac693

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
#include <cstdlib>
12
#include <math.h>
2-
#include <uWS/uWS.h>
33
#include <iostream>
4+
5+
#include <uWS/uWS.h>
46
#include "json.hpp"
57
#include "FusionEKF.h"
68
#include "tools.h"
@@ -157,6 +159,7 @@ int main() {
157159
h.onDisconnection([&h](uWS::WebSocket<uWS::SERVER> ws, int code,
158160
char *message, size_t length) {
159161
std::cout << "Disconnected" << std::endl;
162+
std::exit(0);
160163
});
161164

162165
int port = 4567;

0 commit comments

Comments
 (0)