mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 07:37:00 -07:00
misc: reporting session replay loading progress as api.rest state object
This commit is contained in:
parent
a411607a57
commit
fdc26ca3aa
5 changed files with 50 additions and 13 deletions
|
@ -25,6 +25,7 @@ func (mod *RestAPI) startReplay(filename string) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
mod.State.Store("load_progress", 0)
|
||||
mod.loading = true
|
||||
defer func() {
|
||||
mod.loading = false
|
||||
|
@ -33,7 +34,7 @@ func (mod *RestAPI) startReplay(filename string) (err error) {
|
|||
mod.Info("loading %s ...", mod.recordFileName)
|
||||
|
||||
start := time.Now()
|
||||
if mod.record, err = LoadRecord(mod.recordFileName); err != nil {
|
||||
if mod.record, err = LoadRecord(mod.recordFileName, &mod.SessionModule); err != nil {
|
||||
return err
|
||||
}
|
||||
loadedIn := time.Since(start)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue