 +                   "finalize quic connection: %d", c->fd);
 +
 +    c->error = 1;
++
++    if (quiche_conn_is_closed(c->quic->conn)) {
++        c->close = 1;
++    }
 +
 +    quiche_conn_close(c->quic->conn, false, status, NULL, 0);
 +

 #include <ngx_module.h>
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
new file mode 100644
index 000000000..8c9f8b5be
--- /dev/null
+++ b/src/event/ngx_event_quic.c
@@ -0,0 +1,585 @@
+
+/*
+ * Copyright (C) Cloudflare, Inc.

From cce80d20634af3f68ecf119737b7431b7df97672 Mon Sep 17 00:00:00 2001
From: Alessandro Ghedini <alessandro@cloudflare.com>
Date: Thu, 10 Oct 2019 17:06:08 +0100
Subject: [PATCH] Initial QUIC and HTTP/3 implementation using quiche
