File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
src/opnsense/scripts/unbound Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -185,14 +185,22 @@ def run_logger(self):
185
185
186
186
self ._setup_db ()
187
187
188
- try :
189
- # open() will block until a query has been pushed down the fifo
190
- self .fd = open (self .target_pipe , 'r' )
191
- except InterruptedError :
192
- self .close_logger ()
193
- except OSError :
194
- syslog .syslog (syslog .LOG_ERR , "Unable to open pipe. This is likely because Unbound isn't running." )
195
- sys .exit (1 )
188
+ r_count = 0
189
+ pipe_ready = False
190
+ # give dnsbl_module.py some time to create a pipe
191
+ while r_count < 3 and not pipe_ready :
192
+ try :
193
+ # open() will block until a query has been pushed down the fifo
194
+ self .fd = open (self .target_pipe , 'r' )
195
+ pipe_ready = True
196
+ except InterruptedError :
197
+ self .close_logger ()
198
+ except OSError :
199
+ r_count = + 1
200
+ if r_count == 3 :
201
+ syslog .syslog (syslog .LOG_ERR , "Unable to open pipe. This is likely because Unbound isn't running." )
202
+ sys .exit (1 )
203
+ time .sleep (1 )
196
204
197
205
self .selector .register (self .fd .fileno (), selectors .EVENT_READ , self ._read )
198
206
You can’t perform that action at this time.
0 commit comments