File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,12 @@ pub(super) fn parse_headers<T>(
6767where
6868 T : Http1Transaction ,
6969{
70- // If the buffer is empty, don't bother entering the span, it's just noise.
71- if bytes. is_empty ( ) {
72- return Ok ( None ) ;
73- }
74-
75- let span = trace_span ! ( "parse_headers" ) ;
76- let _s = span. enter ( ) ;
77-
7870 #[ cfg( all( feature = "server" , feature = "runtime" ) ) ]
7971 if !* ctx. h1_header_read_timeout_running {
8072 if let Some ( h1_header_read_timeout) = ctx. h1_header_read_timeout {
73+ let span = trace_span ! ( "parse_headers" ) ;
74+ let _s = span. enter ( ) ;
75+
8176 let deadline = Instant :: now ( ) + h1_header_read_timeout;
8277 * ctx. h1_header_read_timeout_running = true ;
8378 match ctx. h1_header_read_timeout_fut {
9489 }
9590 }
9691
92+ // If the buffer is empty, don't bother entering the span, it's just noise.
93+ if bytes. is_empty ( ) {
94+ return Ok ( None ) ;
95+ }
96+
97+ let span = trace_span ! ( "parse_headers" ) ;
98+ let _s = span. enter ( ) ;
99+
97100 T :: parse ( bytes, ctx)
98101}
99102
You can’t perform that action at this time.
0 commit comments