Fix segfault when client disconnects from scheduler controls

Signed-off-by: Rodrigo Belem <rodrigo.belem@gmail.com>