summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-07-29 19:50:39 +0300
committerMax Romanov <max.romanov@nginx.com>2021-07-29 19:50:39 +0300
commitfa9fb29be221e0393562831a9e3bcba416652f60 (patch)
treebc3e1a28d7915735507c64a62199a189bfb8231f /src/nxt_port.h
parentf3a1c1deb541784b2b0ed179514e4d5eba9fe626 (diff)
downloadunit-fa9fb29be221e0393562831a9e3bcba416652f60.tar.gz
unit-fa9fb29be221e0393562831a9e3bcba416652f60.tar.bz2
Application restart introduced.
When processing a restart request, the router sends a QUIT message to all existing processes of the application. Then, a new shared application port is created to ensure that new requests won't be handled by the old processes of the application.
Diffstat (limited to 'src/nxt_port.h')
-rw-r--r--src/nxt_port.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h
index 5ece3bfa..a0bc2512 100644
--- a/src/nxt_port.h
+++ b/src/nxt_port.h
@@ -50,6 +50,7 @@ struct nxt_port_handlers_s {
/* Various data. */
nxt_port_handler_t data;
+ nxt_port_handler_t app_restart;
nxt_port_handler_t oosm;
nxt_port_handler_t shm_ack;
@@ -100,6 +101,7 @@ typedef enum {
_NXT_PORT_MSG_WEBSOCKET = nxt_port_handler_idx(websocket_frame),
_NXT_PORT_MSG_DATA = nxt_port_handler_idx(data),
+ _NXT_PORT_MSG_APP_RESTART = nxt_port_handler_idx(app_restart),
_NXT_PORT_MSG_OOSM = nxt_port_handler_idx(oosm),
_NXT_PORT_MSG_SHM_ACK = nxt_port_handler_idx(shm_ack),
@@ -139,6 +141,7 @@ typedef enum {
NXT_PORT_MSG_DATA = _NXT_PORT_MSG_DATA,
NXT_PORT_MSG_DATA_LAST = nxt_msg_last(_NXT_PORT_MSG_DATA),
+ NXT_PORT_MSG_APP_RESTART = nxt_msg_last(_NXT_PORT_MSG_APP_RESTART),
NXT_PORT_MSG_OOSM = nxt_msg_last(_NXT_PORT_MSG_OOSM),
NXT_PORT_MSG_SHM_ACK = nxt_msg_last(_NXT_PORT_MSG_SHM_ACK),