diff --git a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp index c4f68bdd39..3d6a92e3d3 100644 --- a/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp +++ b/simulation/halsim_ds_socket/src/main/native/cpp/main.cpp @@ -180,6 +180,11 @@ static void SetupEventLoop(wpi::net::uv::Loop& loop) { static std::unique_ptr eventLoopRunner; +void ThisIsAHackDontCallThis() { + eventLoopRunner = std::make_unique(); + eventLoopRunner->ExecAsync(SetupEventLoop); +} + /*---------------------------------------------------------------------------- ** Main entry point. We will start listen threads going, processing ** against our driver station packet @@ -203,10 +208,6 @@ int HALSIM_InitExtension(void) { singleByte = std::make_unique("0"); - eventLoopRunner = std::make_unique(); - - eventLoopRunner->ExecAsync(SetupEventLoop); - std::puts("DriverStationSocket Initialized!"); return 0; }