shutdown-fix: fix a possible crasher on shutdown

Just saw this happen while working on the ngx_message_handler