diff options
| author | Russ White <russ@riw.us> | 2019-09-03 11:12:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-03 11:12:35 -0400 |
| commit | a3aea4ebaf9edd9aa44ca3a85153c3c82109213c (patch) | |
| tree | 61434ff6a35b68f7270f71f5b5b907ada60dafb6 /ospfd/ospf_ism.h | |
| parent | 0137aeb03006b7f0eb2df575783f8ac8bcbae166 (diff) | |
| parent | 36a106e0e4e4fd787df2277c35df448131fb6b77 (diff) | |
Merge pull request #4907 from donaldsharp/ospf_write_q
ospfd: Do not turn on write thread unless we have something in it
Diffstat (limited to 'ospfd/ospf_ism.h')
| -rw-r--r-- | ospfd/ospf_ism.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h index 5ae99ab320..8d21403695 100644 --- a/ospfd/ospf_ism.h +++ b/ospfd/ospf_ism.h @@ -53,8 +53,9 @@ listnode_add((O)->oi_write_q, oi); \ oi->on_write_q = 1; \ } \ - thread_add_write(master, ospf_write, (O), (O)->fd, \ - &(O)->t_write); \ + if (!list_isempty((O)->oi_write_q)) \ + thread_add_write(master, ospf_write, (O), (O)->fd, \ + &(O)->t_write); \ } while (0) /* Macro for OSPF ISM timer turn on. */ |
