Merge pull request #423 from taheris/fix/moving-write-buffer
Set SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag
This commit is contained in:
commit
bdfa54cfdb
|
|
@ -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_EXTRA_CHAIN_CERT: c_int = 14;
|
||||||
pub const SSL_CTRL_SET_READ_AHEAD: c_int = 41;
|
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_MODE_AUTO_RETRY: c_long = 4;
|
||||||
|
|
||||||
pub const SSL_ERROR_NONE: c_int = 0;
|
pub const SSL_ERROR_NONE: c_int = 0;
|
||||||
|
|
|
||||||
|
|
@ -567,7 +567,7 @@ impl SslContext {
|
||||||
let ctx = SslContext { ctx: ctx };
|
let ctx = SslContext { ctx: ctx };
|
||||||
|
|
||||||
// this is a bit dubious (?)
|
// 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() {
|
if method.is_dtls() {
|
||||||
ctx.set_read_ahead(1);
|
ctx.set_read_ahead(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue