]> gitweb.factorcode.org Git - factor.git/commitdiff
io.sockets.secure: We are not connected, so let it reconnect
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Dec 2021 18:33:01 +0000 (12:33 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 27 Dec 2021 18:36:06 +0000 (12:36 -0600)
fixes mason's download-my-image and add it to tests

basis/io/sockets/secure/openssl/openssl.factor
basis/io/sockets/secure/unix/unix-tests.factor

index 1c5d88cee72159228eb7ae2a9a80951853434952..7cfbdcf3c16ed9cce100a52cb5423a51aa513863 100644 (file)
@@ -297,7 +297,7 @@ PRIVATE>
         { SSL_ERROR_SSL [ drop throw-ssl-error ] }
         ! https://stackoverflow.com/questions/50223224/ssl-read-returns-ssl-error-zero-return-but-err-get-error-is-0
         ! we got disconnected
-        { SSL_ERROR_ZERO_RETURN [ f >>connected t >>terminated premature-close-error ] }
+        { SSL_ERROR_ZERO_RETURN [ f >>connected drop f ] }
         { SSL_ERROR_WANT_ACCEPT [ drop +input+ ] }
     } case ;
 
index 498481e6f5543bff1640383d893b43e3dbb920b4..9104b8d5c8e1062f19cab1bff3cfe6cde03a6804 100644 (file)
@@ -1,8 +1,9 @@
-USING: accessors calendar classes concurrency.conditions
-concurrency.mailboxes concurrency.promises continuations
-destructors io io.backend.unix io.encodings.ascii io.sockets
+USING: accessors bootstrap.image.download calendar classes
+concurrency.conditions concurrency.mailboxes
+concurrency.promises continuations destructors io
+io.backend.unix io.encodings.ascii io.files.temp io.sockets
 io.sockets.secure io.sockets.secure.debug io.streams.duplex
-io.timeouts kernel locals namespaces threads tools.test ;
+io.timeouts kernel namespaces threads tools.test ;
 QUALIFIED-WITH: concurrency.messaging qm
 IN: io.sockets.secure.tests
 
@@ -171,3 +172,7 @@ IN: io.sockets.secure.tests
         ] with-destructors
     ] [ io-timeout? ] must-fail-with
 ] drop
+
+{ } [
+    [ download-my-image ] with-temp-directory
+] unit-test
\ No newline at end of file