function shutdown() {
  try {
    connectionsOutstanding = CONNECTIONS;
    if (keepAliveTimeout) clearTimeout(keepAliveTimeout);
    status.mode = LAND;
    status.enabled = 0;
    disconnect(sockets['at']);
    disconnect(sockets['nav']);
    disconnect(sockets['control']);
  } catch (err) {
    sockets['at'].socket = null;
    sockets['nav'].socket = null;
    sockets['control'].socket = null;
  }
  log("disconnected. press X to reconnect");
    // TODO: disconnect(sockets['vid'].socket);
  }
Closes and discards all the socket connections