Skip to content

Commit

Permalink
Bug: Improper call of sim.stop
Browse files Browse the repository at this point in the history
Signed-off-by: SystemsPurge <[email protected]>
  • Loading branch information
SystemsPurge committed Nov 11, 2024
1 parent b49b619 commit 2236712
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion villas/controller/components/simulators/dpsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def stop(self):
if self._state == 'running':
self.logger.info('Stopping simulation...')

if self.sim and self.sim.stop() is None:
if self.sim:
if self.current < self.count:
self.sim.stop()
self.change_state('stopped')
self.sim = None
self.current = 0
Expand Down

0 comments on commit 2236712

Please sign in to comment.