Skip to content

mosquitto: prevent skb leak

Elena Vengerova requested to merge helen_mosquitto_skb_leak into release-7.3

mosquitto uses socket pair to create sockets for inter-thread signalling (force some thread to get out from select() by sending one byte). Looks like they write to the socket, but nobody reads (at least on my setup and on Michael's setup). As a result each keepalive iteration eats 2-3 skbs. My patch flushes old data from the "R" socket before sending signalling byte to the "W" socket (read from "R" socket is non-blocking, so nothing bad should happen even if somebody starts to read "r" socket properly). For me leak has stopped after this change.

Merge request reports