Permalink
Browse files

ability to skip srv lookups

  • Loading branch information...
1 parent 1395578 commit f074deb8e2a1af73ec112b58d77b00ca1f962f87 Christopher Zorn committed Aug 20, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 punjab/session.py
View
@@ -67,7 +67,7 @@ def make_session(pint, attrs, session_type='BOSH'):
if pint.v:
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'):
connect_srv = False
if s.hostname in ['localhost', '127.0.0.1']:
@@ -186,6 +186,8 @@ def __init__(self, pint, attrs):
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.authenticator.useTls = self.secure

0 comments on commit f074deb

Please sign in to comment.