Skip to content

Commit 4ea1f2c

Browse files
committed
Use Bool (1 byte) for IPV6_V6ONLY on Windows
Closes #564
1 parent 0c9efe1 commit 4ea1f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ impl Socket {
19351935
/// [`set_only_v6`]: Socket::set_only_v6
19361936
pub fn only_v6(&self) -> io::Result<bool> {
19371937
unsafe {
1938-
getsockopt::<c_int>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
1938+
getsockopt::<Bool>(self.as_raw(), sys::IPPROTO_IPV6, sys::IPV6_V6ONLY)
19391939
.map(|only_v6| only_v6 != 0)
19401940
}
19411941
}

0 commit comments

Comments
 (0)