Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aed82e
)
python3: To be safe, abort entirely if initial epoller registration fails.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 1 Feb 2017 04:02:22 +0000
(
05:02
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 1 Feb 2017 04:02:22 +0000
(
05:02
+0100)
python3/ashd/async.py
patch
|
blob
|
blame
|
history
diff --git
a/python3/ashd/async.py
b/python3/ashd/async.py
index
99da89a
..
aa52af9
100644
(file)
--- a/
python3/ashd/async.py
+++ b/
python3/ashd/async.py
@@
-54,8
+54,12
@@
class epoller(object):
ep = select.epoll()
try:
with self.lock:
- for fd, (ob, evs) in self.registered.items():
- ep.register(fd, evs)
+ try:
+ for fd, (ob, evs) in self.registered.items():
+ ep.register(fd, evs)
+ except:
+ self.registered.clear()
+ raise
self.ep = ep
while self.registered: