Stop listening on legacy ws port 29001

This commit is contained in:
Ivan Kozik 2016-05-22 11:06:38 +00:00
parent f0bb696dc8
commit 842fab4b23
3 changed files with 3 additions and 6 deletions

View File

@ -443,7 +443,7 @@ Advanced `gs-server` options
These environmental variables control what `gs-server` listens on:
* `GRAB_SITE_INTERFACE` (default `0.0.0.0`)
* `GRAB_SITE_PORT` (default `29000,29001`; will be just `29000` after ~May 2016)
* `GRAB_SITE_PORT` (default `29000`)
These environmental variables control which server each `grab-site` process connects to:

View File

@ -1 +1 @@
__version__ = '0.11.8'
__version__ = '1.0.0'

View File

@ -97,8 +97,7 @@ class GrabberServerFactory(WebSocketServerFactory):
def main():
loop = asyncio.get_event_loop()
# Listening on 29001 as well for compatibility -- will be removed soon.
ports = list(int(p) for p in os.environ.get('GRAB_SITE_PORT', "29000,29001").split(','))
ports = list(int(p) for p in os.environ.get('GRAB_SITE_PORT', "29000").split(','))
interface = os.environ.get('GRAB_SITE_INTERFACE', '0.0.0.0')
factory = GrabberServerFactory()
@ -106,8 +105,6 @@ def main():
coro = loop.create_server(factory, interface, port)
loop.run_until_complete(coro)
print("grab-site server listening on {}:{}".format(interface, port))
if 'GRAB_SITE_PORT' not in os.environ and 29001 in ports:
print("Note: use port 29000; default listener on port 29001 will go away around May 2016")
loop.run_forever()