diff --git a/libraries/SITL/SIM_FlightAxis.cpp b/libraries/SITL/SIM_FlightAxis.cpp index 10ecfbb49b..a69087b3b0 100644 --- a/libraries/SITL/SIM_FlightAxis.cpp +++ b/libraries/SITL/SIM_FlightAxis.cpp @@ -155,9 +155,8 @@ bool FlightAxis::soap_request_start(const char *action, const char *fmt, ...) va_end(ap); // open SOAP socket to FlightAxis - if (sock) { - delete sock; - } + delete sock; + sock = new SocketAPM(false); if (!sock->connect(controller_ip, controller_port)) { ::printf("connect failed\n");