Skip to content

Commit

Permalink
Fixed SubprocVecEnv close. (#68)
Browse files Browse the repository at this point in the history
Updated changelog.

Co-authored-by: Matthias K <wirspielen@web.de>
  • Loading branch information
NeoExtended and Matthias K committed Jun 20, 2020
1 parent 644d2c1 commit 977a615
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ New Features:

Bug Fixes:
^^^^^^^^^^
- Fixed a bug in the ``close()`` method of ``SubprocVecEnv``, causing wrappers further down in the wrapper stack to not be closed. (@NeoExtended)

Deprecations:
^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions stable_baselines3/common/vec_env/subproc_vec_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def _worker(remote, parent_remote, env_fn_wrapper):
elif cmd == 'render':
remote.send(env.render(data))
elif cmd == 'close':
env.close()
remote.close()
break
elif cmd == 'get_spaces':
Expand Down

0 comments on commit 977a615

Please sign in to comment.