Fix wrong endpoint in and_then (#278)

This commit is contained in:
Pierre Krieger 2018-06-28 10:24:24 +02:00 committed by GitHub
parent 143a1845b1
commit a7a06aa5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ where
let future = dialed_fut
// Try to negotiate the protocol.
.and_then(move |(connection, client_addr)| {
upgrade(connection, Endpoint::Listener, client_addr)
upgrade(connection, Endpoint::Dialer, client_addr)
});
Ok(Box::new(future))