openssl: another attempt to get SSL_shutdown right
This commit is contained in:
parent
5630a3a1ca
commit
06e94d510a
|
@ -897,10 +897,12 @@
|
||||||
(loop cnt)]
|
(loop cnt)]
|
||||||
[else
|
[else
|
||||||
(if (= n 0)
|
(if (= n 0)
|
||||||
;; When 0 is returned, the SSL object doesn't correctly
|
;; When 0 is returned, a shutdown depends on
|
||||||
;; report what it wants (e.g., a write). Send everything
|
;; input from the peer. If we've already tried twice,
|
||||||
;; out that we have and try again, up to 10 times.
|
;; wait for some input and try again.
|
||||||
(unless (cnt . >= . 10)
|
(begin
|
||||||
|
(when (cnt . >= . 2)
|
||||||
|
(pump-input-once mzssl #t))
|
||||||
(loop (add1 cnt)))
|
(loop (add1 cnt)))
|
||||||
((mzssl-error mzssl) 'read-bytes
|
((mzssl-error mzssl) 'read-bytes
|
||||||
"SSL shutdown failed ~a"
|
"SSL shutdown failed ~a"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user