Skip to content

Commit

Permalink
Merge pull request #30 from adinhodovic/fix-excess-close
Browse files Browse the repository at this point in the history
fix: Set subprocess to none on exit
  • Loading branch information
adinhodovic committed Feb 29, 2024
2 parents dd971ca + c59c878 commit a487739
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions django_admin_shellx/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ def run_command(self):
self.subprocess = proc
self.child_pid = proc.pid
proc.wait()

# Subprocess has finished, close the websocket
# happens when process exits, either via user exiting using exit() or by error
self.subprocess = None
self.child_pid = None
self.close(4030)

def connect(self):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "django-admin-shellx"
version = "0.2.6"
version = "0.2.7"
description = "A Django Admin Shell"
authors = ["Adin Hodovic <hodovicadin@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit a487739

Please sign in to comment.