• Meir Shpilraien (Spielrein)'s avatar
    Fix crash on RM_Call inside module load (#11346) · eb6accad
    Meir Shpilraien (Spielrein) authored
    PR #9320 introduces initialization order changes. Now cluster is initialized after modules.
    This changes causes a crash if the module uses RM_Call inside the load function
    on cluster mode (the code will try to access `server.cluster` which at this point is NULL).
    
    To solve it, separate cluster initialization into 2 phases:
    1. Structure initialization that happened before the modules initialization
    2. Listener initialization that happened after.
    
    Test was added to verify the fix.
    eb6accad
server.c 274 KB