comparison src/event/ngx_event_quic.c @ 8258:80d7144b1c38 quic

Closing connection on NGX_QUIC_FT_CONNECTION_CLOSE.
author Sergey Kandaurov <pluknet@nginx.com>
date Sun, 22 Mar 2020 11:35:15 +0300
parents c955b7eaa2d9
children 9e9eab876964
comparison
equal deleted inserted replaced
8257:085fd6e68367 8258:80d7144b1c38
777 case NGX_QUIC_FT_NEW_CONNECTION_ID: 777 case NGX_QUIC_FT_NEW_CONNECTION_ID:
778 ack_this = 1; 778 ack_this = 1;
779 break; 779 break;
780 780
781 case NGX_QUIC_FT_CONNECTION_CLOSE: 781 case NGX_QUIC_FT_CONNECTION_CLOSE:
782 case NGX_QUIC_FT_CONNECTION_CLOSE2:
782 783
783 do_close = 1; 784 do_close = 1;
784 break; 785 break;
785 786
786 case NGX_QUIC_FT_STREAM0: 787 case NGX_QUIC_FT_STREAM0:
837 "trailing garbage in payload: %ui bytes", end - p); 838 "trailing garbage in payload: %ui bytes", end - p);
838 return NGX_ERROR; 839 return NGX_ERROR;
839 } 840 }
840 841
841 if (do_close) { 842 if (do_close) {
842 // TODO: handle stream close 843 ngx_quic_close_connection(c);
844 return NGX_OK;
843 } 845 }
844 846
845 if (ack_this == 0) { 847 if (ack_this == 0) {
846 /* do not ack packets with ACKs and PADDING */ 848 /* do not ack packets with ACKs and PADDING */
847 return NGX_OK; 849 return NGX_OK;