Use SetKeepAlivesEnabled.