Hi,
Checking below code:
bind(interface, port, settings, httpsContext, log)
.mapAsyncUnordered(settings.maxConnections) { connection ⇒
handleOneConnection(connection).recoverWith {
// Ignore incoming errors from the connection as they will cancel the binding.
// As far as it is known currently, these errors can only happen if a TCP error bubbles up
// from the TCP layer through the HTTP layer to the Http.IncomingConnection.flow.
case NonFatal(_) ⇒ Future.successful(())
}(fm.executionContext)
}
.to(Sink.ignore)
.run()
It looks like for each connection, 1 flow (defined by handler) will be materialized.
Does that mean as long as the connection lives, there will only be 1 materialized stream serves for this connection?
And if the connection dies (like idled out from the connection pool), the stream will stop/terminated as well?
Thanks
Leon