Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#450 from ShenYuhan/ff_qa
Browse files Browse the repository at this point in the history
fix serving-stop cannot recover right port number.
  • Loading branch information
sjtubinlong authored Mar 17, 2020
2 parents d2e9e3c + 278239e commit 2888a93
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 2888a93

Please sign in to comment.