Server stop acording to boolean value being set in stop()