Commit 91367ca
committed
Fix and optimisation
There is a race condition if openssl exit during a renego but after
the RENEGOTIATING printing.
In this case we could issue a R before the process exit and be blocked
in the waiting loop.
With the safety guards in place (loop count + timeout) this is harmless
but not optimal.
Fix this by:
- reordering the sleep vs echo to let the process exit and catch the
pipe error more frequently.
- exit the while loop if RENEGOTIATING is not the last log line. We
will catch the pipe error on the next for loop echo.
- correct the k variable initialisation
- correct the for (( ; ; )) variable $ convention usage
- reduce the while loop count limit to 120 to align with the global
timeout1 parent 35496e5 commit 91367ca
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17113 | 17113 | | |
17114 | 17114 | | |
17115 | 17115 | | |
17116 | | - | |
17117 | | - | |
| 17116 | + | |
| 17117 | + | |
| 17118 | + | |
17118 | 17119 | | |
17119 | 17120 | | |
17120 | 17121 | | |
| |||
0 commit comments