Set SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag

This commit is contained in:
Shaun Taheri 2016-07-22 18:16:55 +02:00 committed by Shaun Taheri
parent 85f5b8629c
commit 722a2bd673
2 changed files with 2 additions and 1 deletions

View File

@ -272,6 +272,7 @@ pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55;
pub const SSL_CTRL_EXTRA_CHAIN_CERT: c_int = 14;
pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41;
pub const SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER: c_long = 2;
pub const SSL_MODE_AUTO_RETRY: c_long = 4;
pub const SSL_ERROR_NONE: c_int = 0;

View File

@ -567,7 +567,7 @@ impl SslContext {
let ctx = SslContext { ctx: ctx };
// this is a bit dubious (?)
try!(ctx.set_mode(ffi::SSL_MODE_AUTO_RETRY));
try!(ctx.set_mode(ffi::SSL_MODE_AUTO_RETRY | ffi::SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER));
if method.is_dtls() {
ctx.set_read_ahead(1);