1184: Pass the correct buffer when creating TcpSocket r=lulf a=lulf



Co-authored-by: Ulf Lilleengen <lulf@redhat.com>
This commit is contained in:
bors[bot] 2023-01-31 18:38:16 +00:00 committed by GitHub
commit 4c19464548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -389,7 +389,7 @@ pub mod client {
fn new<D: Driver>(stack: &'d Stack<D>, state: &'d TcpClientState<N, TX_SZ, RX_SZ>) -> Result<Self, Error> {
let mut bufs = state.pool.alloc().ok_or(Error::ConnectionReset)?;
Ok(Self {
socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().0, &mut bufs.as_mut().1) },
socket: unsafe { TcpSocket::new(stack, &mut bufs.as_mut().1, &mut bufs.as_mut().0) },
state,
bufs,
})