     handle ;
 
 : ssl-error-syscall ( ssl-handle -- event/f )
-    f >>connected
-    t >>terminated drop
+    f >>connected drop
     ERR_get_error {
         { -1 [
             errno { [ ECONNRESET = ] [ EPIPE = ] } 1||

        { 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 [ t >>terminated f >>connected drop f ] }
        { SSL_ERROR_WANT_ACCEPT [ drop +input+ ] }
    } case ;


        tri
    ] with-destructors ;

TUPLE: ssl-handle < disposable file handle connected ;

SYMBOL: default-secure-context

