Skip to content

Commit

Permalink
ability to skip srv lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Zorn committed Aug 20, 2011
1 parent 1395578 commit f074deb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion punjab/session.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def make_session(pint, attrs, session_type='BOSH'):
if pint.v: if pint.v:
log.msg('================================== %s connect to %s:%s ==================================' % (str(time.time()),s.hostname,s.port)) log.msg('================================== %s connect to %s:%s ==================================' % (str(time.time()),s.hostname,s.port))


connect_srv = True connect_srv = self.connect_srv
if attrs.has_key('route'): if attrs.has_key('route'):
connect_srv = False connect_srv = False
if s.hostname in ['localhost', '127.0.0.1']: if s.hostname in ['localhost', '127.0.0.1']:
Expand Down Expand Up @@ -186,6 +186,8 @@ def __init__(self, pint, attrs):


self.use_raw = getattr(pint, 'use_raw', False) # use raw buffers self.use_raw = getattr(pint, 'use_raw', False) # use raw buffers


self.connect_srv = getattr(pint, 'connect_srv', True)

self.secure = attrs.has_key('secure') and attrs['secure'] == 'true' self.secure = attrs.has_key('secure') and attrs['secure'] == 'true'
self.authenticator.useTls = self.secure self.authenticator.useTls = self.secure


Expand Down

0 comments on commit f074deb

Please sign in to comment.