chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ad21c2
)
svc/connect.in: Add a backstop exception handler to the pinger loop.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 11 May 2018 23:45:14 +0000
(
00:45
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 14 Jun 2018 09:34:25 +0000
(10:34 +0100)
It'll moan, but it won't actually kill the loop any more.
svc/connect.in
patch
|
blob
|
blame
|
history
diff --git
a/svc/connect.in
b/svc/connect.in
index c68e520d03e6f1d65363ad26a915731e920b26c5..37714252569109f640aab6c9592f019e467e36b4 100644
(file)
--- a/
svc/connect.in
+++ b/
svc/connect.in
@@
-37,6
+37,7
@@
from math import sqrt
import cdb as CDB
import mLib as M
import re as RX
+import sys as SYS
from time import time
import subprocess as PROC
@@
-567,7
+568,9
@@
class Pinger (T.Coroutine):
while True:
(peer, seq), code, stuff = me._q.get()
if peer in me._peers and seq == me._peers[peer].seq:
- me._peers[peer].event(code, stuff)
+ try: me._peers[peer].event(code, stuff)
+ except Exception, e:
+ SYS.excepthook(*SYS.exc_info())
def add(me, peer, pingnow):
"""