When an IRC user offers a file with a passive DCC (reverse DCC), the xfer plugin opens a socket for this transfer.
The socket is opened and bound to a local port as soon as the offer is received, before the user accepts it.
Pending offers have no timeout and no limit: the socket stays open until the transfer is accepted or removed.
Any IRC user can send many such offers, each one keeping a file descriptor open in WeeChat.
When the limit of open files is reached, WeeChat cannot open new files or sockets.
For example, new log files cannot be opened, and new connections to IRC servers or from relay clients fail.
Pending offers also reserve ports of the option xfer.network.port_range, so other DCC transfers can fail.
With the fix, the socket is opened only when the transfer is accepted, manually or automatically.
In addition, a resumed transfer fails if DCC ACCEPT is not received before the timeout (option xfer.network.timeout).
Mitigation
There are multiple ways to mitigate this issue:
Cancel the pending offers from unknown users in the xfer buffer (/xfer), with the input c on the selected line
If DCC is not used, unload the xfer plugin: /plugin unload xfer, and do not load it on startup, see: /help weechat.plugin.autoload