Ah true, I might have had you confused in a way.
Let's say mqtt starts both tcp and ssl listeners.
The way that would be nice is that I could set the tcp listener and ssl listener max_connections separately.
And since tcp_listen_options is carried out to both listeners, defining the max_connections there would make it shared to both tcp and ssl listeners.
Having it only in ssl_options would carry it to ssl listener.
That was my whole point here (but for some reason I started to moan about the plugin stuff).
It then would be the matter of tcp_listener_sup to check that does a max_connections value exits eg. in the SocketOpts (or ProtoOpts) and use that is exists, otherwise infinity.
Or am I still barking at the wrong tree here?