Router: fixed segmentation fault.

The router process exited abnormally on reconfiguration if number
of worker threads had been decreased on the previous reconfiguration.
Besides the list of router engines should be updated only after a new
configuration joints have been prepared for all engines.
This commit is contained in:
Igor Sysoev
2017-09-14 22:30:38 +03:00
parent 4953e5b5cb
commit 309ba5abf2
2 changed files with 38 additions and 10 deletions

View File

@@ -34,6 +34,12 @@ typedef struct {
typedef struct {
nxt_event_engine_t *engine;
nxt_work_t *jobs;
enum {
NXT_ROUTER_ENGINE_KEEP = 0,
NXT_ROUTER_ENGINE_ADD,
NXT_ROUTER_ENGINE_DELETE,
} action;
} nxt_router_engine_conf_t;