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>(
67
67
where
68
68
T : Http1Transaction ,
69
69
{
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
-
78
70
#[ cfg( all( feature = "server" , feature = "runtime" ) ) ]
79
71
if !* ctx. h1_header_read_timeout_running {
80
72
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
+
81
76
let deadline = Instant :: now ( ) + h1_header_read_timeout;
82
77
* ctx. h1_header_read_timeout_running = true ;
83
78
match ctx. h1_header_read_timeout_fut {
94
89
}
95
90
}
96
91
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
+
97
100
T :: parse ( bytes, ctx)
98
101
}
99
102
You can’t perform that action at this time.
0 commit comments