summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/ngx_event_quic_migration.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-08-08 10:43:17 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-08-08 10:43:17 +0400
commit58fc5e2830a0fa70810005ca03fdb9a531719696 (patch)
treeeb1090a0450ab9950fa3101a5cef18b4ee680427 /src/event/quic/ngx_event_quic_migration.c
parent8ab38890736128ec0e167ae28d23d3bbfe2a2223 (diff)
downloadnginx-58fc5e2830a0fa70810005ca03fdb9a531719696.tar.gz
nginx-58fc5e2830a0fa70810005ca03fdb9a531719696.tar.bz2
QUIC: allowed ngx_quic_frame_sendto() to return NGX_AGAIN.
Previously, NGX_AGAIN returned by ngx_quic_send() was treated by ngx_quic_frame_sendto() as error, which triggered errors in its callers. However, a blocked socket is not an error. Now NGX_AGAIN is passed as is to the ngx_quic_frame_sendto() callers, which can safely ignore it.
Diffstat (limited to 'src/event/quic/ngx_event_quic_migration.c')
-rw-r--r--src/event/quic/ngx_event_quic_migration.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/quic/ngx_event_quic_migration.c b/src/event/quic/ngx_event_quic_migration.c
index ca821f8b4..a91b49a1d 100644
--- a/src/event/quic/ngx_event_quic_migration.c
+++ b/src/event/quic/ngx_event_quic_migration.c
@@ -46,7 +46,7 @@ ngx_quic_handle_path_challenge_frame(ngx_connection_t *c,
* An endpoint MUST expand datagrams that contain a PATH_RESPONSE frame
* to at least the smallest allowed maximum datagram size of 1200 bytes.
*/
- if (ngx_quic_frame_sendto(c, &frame, 1200, pkt->path) != NGX_OK) {
+ if (ngx_quic_frame_sendto(c, &frame, 1200, pkt->path) == NGX_ERROR) {
return NGX_ERROR;
}
@@ -544,13 +544,13 @@ ngx_quic_send_path_challenge(ngx_connection_t *c, ngx_quic_path_t *path)
*/
/* same applies to PATH_RESPONSE frames */
- if (ngx_quic_frame_sendto(c, &frame, 1200, path) != NGX_OK) {
+ if (ngx_quic_frame_sendto(c, &frame, 1200, path) == NGX_ERROR) {
return NGX_ERROR;
}
ngx_memcpy(frame.u.path_challenge.data, path->challenge2, 8);
- if (ngx_quic_frame_sendto(c, &frame, 1200, path) != NGX_OK) {
+ if (ngx_quic_frame_sendto(c, &frame, 1200, path) == NGX_ERROR) {
return NGX_ERROR;
}