Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
884f8b31
Commit
884f8b31
authored
Nov 16, 2023
by
Dridi Boukelmoune
Committed by
Simon Stridsberg
Mar 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http2_proto: Make h2_stream_tmo() return an error
parent
ec95d049
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
cache_http2.h
bin/varnishd/http2/cache_http2.h
+1
-1
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+11
-11
No files found.
bin/varnishd/http2/cache_http2.h
View file @
884f8b31
...
...
@@ -255,7 +255,7 @@ void H2_Send(struct worker *, struct h2_req *, h2_frame type, uint8_t flags,
/* cache_http2_proto.c */
struct
h2_req
*
h2_new_req
(
struct
h2_sess
*
,
unsigned
stream
,
struct
req
*
);
int
h2_stream_tmo
(
struct
h2_sess
*
,
const
struct
h2_req
*
,
vtim_real
);
h2_error
h2_stream_tmo
(
struct
h2_sess
*
,
const
struct
h2_req
*
,
vtim_real
);
void
h2_del_req
(
struct
worker
*
,
struct
h2_req
*
);
void
h2_kill_req
(
struct
worker
*
,
struct
h2_sess
*
,
struct
h2_req
*
,
h2_error
);
int
h2_rxframe
(
struct
worker
*
,
struct
h2_sess
*
);
...
...
bin/varnishd/http2/cache_http2_proto.c
View file @
884f8b31
...
...
@@ -1285,10 +1285,10 @@ h2_procframe(struct worker *wrk, struct h2_sess *h2, h2_frame h2f)
return
(
NULL
);
}
int
h2_error
h2_stream_tmo
(
struct
h2_sess
*
h2
,
const
struct
h2_req
*
r2
,
vtim_real
now
)
{
int
r
=
0
;
h2_error
h2e
=
NULL
;
CHECK_OBJ_NOTNULL
(
h2
,
H2_SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
r2
,
H2_REQ_MAGIC
);
...
...
@@ -1301,36 +1301,36 @@ h2_stream_tmo(struct h2_sess *h2, const struct h2_req *r2, vtim_real now)
AN
(
r2
->
t_winupd
);
if
(
r2
->
t_winupd
==
0
&&
r2
->
t_send
==
0
)
return
(
0
);
return
(
NULL
);
if
(
isnan
(
now
)
||
(
r2
->
t_winupd
!=
0
&&
now
-
r2
->
t_winupd
>
SESS_TMO
(
h2
->
sess
,
idle_send_timeout
)))
{
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: stream %u: Hit idle_send_timeout waiting for"
" WINDOW_UPDATE"
,
r2
->
stream
);
r
=
1
;
h2e
=
H2SE_CANCEL
;
}
if
(
r
==
0
&&
r2
->
t_send
!=
0
&&
if
(
h2e
==
NULL
&&
r2
->
t_send
!=
0
&&
now
-
r2
->
t_send
>
SESS_TMO
(
h2
->
sess
,
send_timeout
))
{
VSLb
(
h2
->
vsl
,
SLT_Debug
,
"H2: stream %u: Hit send_timeout"
,
r2
->
stream
);
r
=
1
;
h2e
=
H2SE_CANCEL
;
}
return
(
r
);
return
(
h2e
);
}
static
int
static
h2_error
h2_stream_tmo_unlocked
(
struct
h2_sess
*
h2
,
const
struct
h2_req
*
r2
)
{
int
r
;
h2_error
h2e
;
Lck_Lock
(
&
h2
->
sess
->
mtx
);
r
=
h2_stream_tmo
(
h2
,
r2
,
h2
->
sess
->
t_idle
);
h2e
=
h2_stream_tmo
(
h2
,
r2
,
h2
->
sess
->
t_idle
);
Lck_Unlock
(
&
h2
->
sess
->
mtx
);
return
(
r
);
return
(
h2e
);
}
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment