flexnbd: Make the killswitch runtime-selectable
We're not actually using it in production right now because it doesn't shut its sockets down cleanly enough. This is a better option than reverting the functionality or keeping production downgraded until we sort out a handler that cleanly closes the sockets.
This commit is contained in:
@@ -500,6 +500,10 @@ void client_arm_killswitch( struct client* client )
|
||||
.it_interval = { .tv_nsec = 0, .tv_sec = 0 }
|
||||
};
|
||||
|
||||
if ( !client->serve->use_killswitch ) {
|
||||
return;
|
||||
}
|
||||
|
||||
debug( "Arming killswitch" );
|
||||
|
||||
FATAL_IF_NEGATIVE(
|
||||
@@ -517,6 +521,10 @@ void client_disarm_killswitch( struct client* client )
|
||||
.it_interval = { .tv_nsec = 0, .tv_sec = 0 }
|
||||
};
|
||||
|
||||
if ( !client->serve->use_killswitch ) {
|
||||
return;
|
||||
}
|
||||
|
||||
debug( "Disarming killswitch" );
|
||||
|
||||
FATAL_IF_NEGATIVE(
|
||||
|
Reference in New Issue
Block a user