From 278239e483a651043d9f113c26537cf2c2a9fa04 Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Tue, 17 Mar 2020 14:43:01 +0800 Subject: [PATCH] fix serving-stop cannot recover right port number. --- paddlehub/commands/serving.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddlehub/commands/serving.py b/paddlehub/commands/serving.py index c7c5b868d..c0ec248cf 100644 --- a/paddlehub/commands/serving.py +++ b/paddlehub/commands/serving.py @@ -222,6 +222,7 @@ def preinstall_modules(self): def start_app_with_file(self): port = self.args.config.get("port", 8866) + self.args.port = port if ServingCommand.is_port_occupied("127.0.0.1", port) is True: print("Port %s is occupied, please change it." % port) return False @@ -240,6 +241,7 @@ def start_app_with_file(self): def start_single_app_with_file(self): port = self.args.config.get("port", 8866) + self.args.port = port if ServingCommand.is_port_occupied("127.0.0.1", port) is True: print("Port %s is occupied, please change it." % port) return False