fix: start record fragment arg

This commit is contained in:
langhuihui
2023-10-08 13:25:25 +08:00
parent 19bdc05f76
commit 3be25dc538

View File

@@ -74,8 +74,7 @@ func (conf *RecordConfig) API_start(w http.ResponseWriter, r *http.Request) {
}
recorder := irecorder.GetRecorder()
if fragment != "" {
f, err := time.ParseDuration(fragment)
if err != nil {
if f, err := time.ParseDuration(fragment); err == nil {
recorder.Fragment = f
}
}