projects
/
vpproxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Обработка таймаута при закрытии потока.
[vpproxy.git]
/
vlcclient
/
vlcclient.py
diff --git
a/vlcclient/vlcclient.py
b/vlcclient/vlcclient.py
index 1fa5e4330d5feb7640febe5c42575956efea45ed..949215627f5c9fc89fc87c6fb8104950669533c2 100644
(file)
--- a/
vlcclient/vlcclient.py
+++ b/
vlcclient/vlcclient.py
@@
-183,9
+183,19
@@
class VlcClient(object):
if time.time()-lasttime>timeout:
to_stop.add(stream)
for stream in to_stop:
if time.time()-lasttime>timeout:
to_stop.add(stream)
for stream in to_stop:
- self.stopBroadcast(stream)
+ try:
+ self.stopBroadcast(stream)
+ except:
+ pass
self._resultlock.release()
self._resultlock.release()
+ def check_stream(self,stream_name):
+ if stream_name in self.streams:
+ self.streams[stream_name]=time.time()
+ return True
+ else:
+ return False
+
def pauseBroadcast(self, stream_name):
return self._write(VlcMessage.request.pauseBroadcast(stream_name))
def pauseBroadcast(self, stream_name):
return self._write(VlcMessage.request.pauseBroadcast(stream_name))