Skip to content

Commit 84987b8

Browse files
Merge pull request #91 from sespivak/zeep
Prevent hangup of 50X10_32M cams on event pullpoint create
2 parents ef27776 + 7908158 commit 84987b8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

onvif/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class ONVIFCamera(object):
199199
def __init__(self, host, port, user, passwd,
200200
wsdl_dir=os.path.join(os.path.dirname(os.path.dirname(__file__)),
201201
"wsdl"),
202-
encrypt=True, daemon=False, no_cache=False, adjust_time=False,
202+
encrypt=True, daemon=False, no_cache=False, adjust_time=False, event_pullpoint=True,
203203
transport=None):
204204
os.environ.pop('http_proxy', None)
205205
os.environ.pop('https_proxy', None)
@@ -212,6 +212,7 @@ def __init__(self, host, port, user, passwd,
212212
self.daemon = daemon
213213
self.no_cache = no_cache
214214
self.adjust_time = adjust_time
215+
self.event_pullpoint = event_pullpoint
215216
self.transport = transport
216217

217218
# Active service client container
@@ -261,8 +262,9 @@ def update_xaddrs(self):
261262
with self.services_lock:
262263
try:
263264
self.event = self.create_events_service()
264-
self.xaddrs['http://www.onvif.org/ver10/events/wsdl/PullPointSubscription'] = \
265-
self.event.CreatePullPointSubscription().SubscriptionReference.Address._value_1
265+
if self.event_pullpoint:
266+
self.xaddrs['http://www.onvif.org/ver10/events/wsdl/PullPointSubscription'] = \
267+
self.event.CreatePullPointSubscription().SubscriptionReference.Address._value_1
266268
except Exception:
267269
pass
268270

0 commit comments

Comments
 (0)