Skip to content

Commit

Permalink
fix serving-stop cannot recover right port number.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenYuhan committed Mar 17, 2020
1 parent d2e9e3c commit 278239e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions paddlehub/commands/serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 278239e

Please sign in to comment.