Heartbeat timeout called m_con->disconnect() on a server-managed connection, which didn't trigger TcpServer::clientDisconnected — leaving dead satellites in the map forever. After timeout, the unsigned rx counter wrapped to UINT_MAX preventing re-detection. The timer also kept firing sendMsg() to the dead socket, blocking the event loop and causing /status to stall for ~10s. Fix: SatelliteLink emits linkFailed signal instead of calling disconnect directly. Reflector handles cleanup via a deferred zero-timer to avoid re-entrancy. The /status handler skips satellites pending cleanup. Also disable ALSA in Docker build (unused by the reflector).
42 lines
1.0 KiB
Docker
42 lines
1.0 KiB
Docker
# Stage 1: Build
|
|
FROM debian:bookworm AS builder
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
cmake \
|
|
libsigc++-2.0-dev \
|
|
libssl-dev \
|
|
libjsoncpp-dev \
|
|
libpopt-dev \
|
|
libopus-dev \
|
|
libgsm1-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /src
|
|
COPY src/ src/
|
|
RUN cmake -S src -B build -DLOCAL_STATE_DIR=/var -DUSE_ALSA=OFF \
|
|
&& cmake --build build
|
|
|
|
|
|
# Stage 2: Runtime
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libsigc++-2.0-0v5 \
|
|
libssl3 \
|
|
libjsoncpp25 \
|
|
libpopt0 \
|
|
libopus0 \
|
|
libgsm1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /src/build/bin/svxreflector /usr/bin/svxreflector
|
|
|
|
# 5300 tcp+udp: SvxLink client connections and audio
|
|
# 5302 tcp: server-to-server trunk links
|
|
# 8080 tcp: HTTP status endpoint (optional, enable via HTTP_SRV_PORT)
|
|
EXPOSE 5300/tcp 5300/udp 5302/tcp 8080/tcp
|
|
|
|
ENTRYPOINT ["svxreflector"]
|
|
CMD ["--config", "/etc/svxlink/svxreflector.conf"]
|