sockvnc - rework exit handling