mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-15 05:26:47 +00:00
librustuv -- fix unsafe sharing in rustuv
This commit is contained in:
parent
56c5d4cec3
commit
844eab1940
@ -510,8 +510,9 @@ impl rtio::RtioUdpSocket for UdpWatcher {
|
||||
buf: Some(slice_to_uv_buf(buf)),
|
||||
result: None,
|
||||
};
|
||||
let handle = self.handle;
|
||||
wait_until_woken_after(&mut cx.task, || {
|
||||
unsafe { uvll::set_data_for_uv_handle(self.handle, &cx) }
|
||||
unsafe { uvll::set_data_for_uv_handle(handle, &cx) }
|
||||
});
|
||||
match cx.result.take_unwrap() {
|
||||
(n, _) if n < 0 =>
|
||||
|
Loading…
Reference in New Issue
Block a user