Skip to content

Commit eb4d503

Browse files
committed
make twisted examples use explicit interface to listen to.
1 parent 57a97a8 commit eb4d503

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/twisted/resource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
sys 0m0.005s
6363
'''
6464

65-
host = '0.0.0.O'
65+
host = '0.0.0.0'
6666
port = 9758
6767

6868
if __name__=='__main__':
@@ -71,7 +71,7 @@
7171
site = Site(resource)
7272

7373

74-
reactor.listenTCP(port, site)
74+
reactor.listenTCP(port, site, interface=host)
7575

7676
logging.info("listening on: %s:%d" % (host,port))
7777
logging.info('wsdl is at: http://%s:%d/?wsdl' % (host, port))

examples/twisted/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
resource = WSGIResource(reactor, reactor, wsgi_application)
7272
site = Site(resource)
7373

74-
reactor.listenTCP(port, site)
74+
reactor.listenTCP(port, site, interface=host)
7575

7676
logging.info('listening on: %s:%d' % (host,port))
7777
logging.info('wsdl is at: http://%s:%d/?wsdl' % (host, port))

0 commit comments

Comments
 (0)