1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 23:30:36 +02:00

add Config argument to NewService

This commit is contained in:
Nikolay Kim
2019-02-22 12:44:37 -08:00
parent 6ea128fac5
commit 862be49e30
32 changed files with 386 additions and 433 deletions

View File

@ -44,7 +44,7 @@ impl<T: AsyncRead + AsyncWrite> NewService for NativeTlsAcceptor<T> {
type InitError = ();
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
MAX_CONN_COUNTER.with(|conns| {
ok(NativeTlsAcceptorService {
acceptor: self.acceptor.clone(),

View File

@ -44,7 +44,7 @@ impl<T: AsyncRead + AsyncWrite> NewService for OpensslAcceptor<T> {
type InitError = ();
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
MAX_CONN_COUNTER.with(|conns| {
ok(OpensslAcceptorService {
acceptor: self.acceptor.clone(),

View File

@ -46,7 +46,7 @@ impl<T: AsyncRead + AsyncWrite> NewService for RustlsAcceptor<T> {
type InitError = ();
type Future = FutureResult<Self::Service, Self::InitError>;
fn new_service(&self) -> Self::Future {
fn new_service(&self, _: &()) -> Self::Future {
MAX_CONN_COUNTER.with(|conns| {
ok(RustlsAcceptorService {
acceptor: self.config.clone().into(),