net/osx-ssl: fix error handling

This commit is contained in:
Matthew Flatt 2016-01-07 06:55:57 -07:00
parent 9a6726b10d
commit 7db904e984

View File

@ -394,7 +394,7 @@
(cond
[(zero? n)
(wrap-evt always-evt (lambda (v) #f))]
[(n . < . -1)
[(negative? n)
(raise-osx-ssl-network-error 'write-bytes
(CFWriteStreamGetError out))]
[else n]))]
@ -461,6 +461,7 @@
(close-output-port p)))
(define (raise-osx-ssl-network-error who err)
(raise
(exn:fail:network
(~a who ": failed " (CFStreamError->list err))
(current-continuation-marks)))
(current-continuation-marks))))