Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python3: To be safe, abort entirely if initial epoller registration fails.
[ashd.git]
/
python3
/
ashd
/
async.py
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:
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:
self.ep = ep
while self.registered: