@@ -523,16 +523,17 @@ impl<L> Server<L> {
523
523
let timeout = self . timeout ;
524
524
let max_frame_size = self . max_frame_size ;
525
525
526
- // FIXME: this requires additonal implementation here.
527
- let http2_only = !self . accept_http1 ;
526
+ // TODO: Reqiures support from hyper-util
527
+ let _http2_only = !self . accept_http1 ;
528
528
529
529
let http2_keepalive_interval = self . http2_keepalive_interval ;
530
530
let http2_keepalive_timeout = self
531
531
. http2_keepalive_timeout
532
532
. unwrap_or_else ( || Duration :: new ( DEFAULT_HTTP2_KEEPALIVE_TIMEOUT_SECS , 0 ) ) ;
533
533
let http2_adaptive_window = self . http2_adaptive_window ;
534
534
535
- let http2_max_pending_accept_reset_streams = self . http2_max_pending_accept_reset_streams ;
535
+ // TODO: Requires a new release of hyper and hyper-util
536
+ let _http2_max_pending_accept_reset_streams = self . http2_max_pending_accept_reset_streams ;
536
537
537
538
let make_service = self . service_builder . service ( svc) ;
538
539
@@ -547,6 +548,9 @@ impl<L> Server<L> {
547
548
548
549
let mut builder = hyper_util:: server:: conn:: auto:: Builder :: new ( TokioExecutor :: new ( ) ) ;
549
550
551
+ //TODO: Set http2-only when available in hyper_util
552
+ //builder.http2_only(http2_only);
553
+
550
554
builder
551
555
. http2 ( )
552
556
. initial_connection_window_size ( init_connection_window_size)
@@ -555,8 +559,8 @@ impl<L> Server<L> {
555
559
. keep_alive_interval ( http2_keepalive_interval)
556
560
. keep_alive_timeout ( http2_keepalive_timeout)
557
561
. adaptive_window ( http2_adaptive_window. unwrap_or_default ( ) )
558
- // FIXME : wait for this to be added to hyper-util
559
- // .max_pending_accept_reset_streams(http2_max_pending_accept_reset_streams)
562
+ // TODO : wait for this to be added to hyper-util
563
+ //.max_pending_accept_reset_streams(http2_max_pending_accept_reset_streams)
560
564
. max_frame_size ( max_frame_size) ;
561
565
562
566
let ( signal_tx, signal_rx) = tokio:: sync:: watch:: channel ( ( ) ) ;
@@ -1068,18 +1072,13 @@ where
1068
1072
}
1069
1073
}
1070
1074
1075
+ // A future which only yields `Poll::Ready` once, and thereafter yields `Poll::Pending`.
1071
1076
#[ pin_project]
1072
1077
struct Fuse < F > {
1073
1078
#[ pin]
1074
1079
inner : Option < F > ,
1075
1080
}
1076
1081
1077
- impl < F > Fuse < F > {
1078
- fn is_terminated ( self : & Pin < & mut Self > ) -> bool {
1079
- self . inner . is_none ( )
1080
- }
1081
- }
1082
-
1083
1082
impl < F > Future for Fuse < F >
1084
1083
where
1085
1084
F : Future ,
0 commit comments