comparison src/event/ngx_event_quic.c @ 8267:a8349cc72c64 quic

Avoid using QUIC connection after CONNECTION_CLOSE.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 23 Mar 2020 19:19:44 +0300
parents f92e583fc256
children c87a13514abc
comparison
equal deleted inserted replaced
8266:f92e583fc256 8267:a8349cc72c64
642 642
643 } else { 643 } else {
644 rc = ngx_quic_app_input(c, &pkt); 644 rc = ngx_quic_app_input(c, &pkt);
645 } 645 }
646 646
647 if (rc == NGX_ERROR) { 647 if (rc != NGX_OK) {
648 return NGX_ERROR; 648 return rc;
649 } 649 }
650 650
651 /* b->pos is at header end, adjust by actual packet length */ 651 /* b->pos is at header end, adjust by actual packet length */
652 p = b->pos + pkt.len; 652 p = b->pos + pkt.len;
653 b->pos = p; /* reset b->pos to the next packet start */ 653 b->pos = p; /* reset b->pos to the next packet start */
912 "trailing garbage in payload: %ui bytes", end - p); 912 "trailing garbage in payload: %ui bytes", end - p);
913 return NGX_ERROR; 913 return NGX_ERROR;
914 } 914 }
915 915
916 if (do_close) { 916 if (do_close) {
917 ngx_quic_close_connection(c); 917 return NGX_DONE;
918 return NGX_OK;
919 } 918 }
920 919
921 if (ack_this == 0) { 920 if (ack_this == 0) {
922 /* do not ack packets with ACKs and PADDING */ 921 /* do not ack packets with ACKs and PADDING */
923 return NGX_OK; 922 return NGX_OK;