]> granicus.if.org Git - libevent/commitdiff
test/http: allow dirty shutdown for ssl to fix https_incomplete
authorAzat Khuzhin <a3at.mail@gmail.com>
Thu, 5 Nov 2015 23:24:28 +0000 (02:24 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Fri, 6 Nov 2015 06:43:25 +0000 (09:43 +0300)
test/regress_http.c

index bd8268c83d7fe630c33571ab10421893de78ad01..a419cabb8a72433455f88df6bafc1412452b8c7b 100644 (file)
@@ -438,14 +438,18 @@ static struct bufferevent *
 create_bev(struct event_base *base, int fd, int ssl)
 {
        int flags = BEV_OPT_DEFER_CALLBACKS;
+       struct bufferevent *bev;
 
        if (!ssl) {
-               return bufferevent_socket_new(base, fd, flags);
+               bev = bufferevent_socket_new(base, fd, flags);
        } else {
                SSL *ssl = SSL_new(get_ssl_ctx());
-               return bufferevent_openssl_socket_new(
+               bev = bufferevent_openssl_socket_new(
                        base, fd, ssl, BUFFEREVENT_SSL_CONNECTING, flags);
+               bufferevent_openssl_set_allow_dirty_shutdown(bev, 1);
        }
+
+       return bev;
 }
 
 static void