In summary, the connection limiting issues are caused by these lines of code inside HTTPRequestHandler:
func channelInactive(context: ChannelHandlerContext, httpServer: HTTPServer) {
httpServer.connectionCount.sub(1)
}
This method doesn't belong to ChannelInboundHandler, and so NIO doesn't call it automatically. The fix is very simple, to remove the httpServer argument and use the locally-stored server reference.
The connection limiting as a whole is a little questionable, but I'll address that in a separate issue.