diff --git a/http_disk_server.py b/http_disk_server.py index de51eed..e17b2e5 100755 --- a/http_disk_server.py +++ b/http_disk_server.py @@ -425,6 +425,10 @@ def emit_server_ready(): disk_fd = open_device(disk, retry=False) else: disk_fd = open_device(disk) + + if SIGTERM_RECEIVED: + break + is_block_device = stat.S_ISBLK(os.fstat(disk_fd).st_mode) HandlerClass = MakeRequestHandler(disk_fd, is_block_device) diff --git a/setup.py b/setup.py index 68bf933..d7286b2 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name="http-nbd-transfer", - version="1.4.0", + version="1.5.0", description="Set of tools to transfer NBD requests to an HTTP server", author="Ronan Abhamon ", author_email="ronan.abhamon@vates.tech",