net/osx-ssl: fix error handling
This commit is contained in:
parent
9a6726b10d
commit
7db904e984
|
@ -394,7 +394,7 @@
|
||||||
(cond
|
(cond
|
||||||
[(zero? n)
|
[(zero? n)
|
||||||
(wrap-evt always-evt (lambda (v) #f))]
|
(wrap-evt always-evt (lambda (v) #f))]
|
||||||
[(n . < . -1)
|
[(negative? n)
|
||||||
(raise-osx-ssl-network-error 'write-bytes
|
(raise-osx-ssl-network-error 'write-bytes
|
||||||
(CFWriteStreamGetError out))]
|
(CFWriteStreamGetError out))]
|
||||||
[else n]))]
|
[else n]))]
|
||||||
|
@ -461,6 +461,7 @@
|
||||||
(close-output-port p)))
|
(close-output-port p)))
|
||||||
|
|
||||||
(define (raise-osx-ssl-network-error who err)
|
(define (raise-osx-ssl-network-error who err)
|
||||||
(exn:fail:network
|
(raise
|
||||||
(~a who ": failed " (CFStreamError->list err))
|
(exn:fail:network
|
||||||
(current-continuation-marks)))
|
(~a who ": failed " (CFStreamError->list err))
|
||||||
|
(current-continuation-marks))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user