Fix unix connect (#19)

* Add some debug info

* Fix a bug in UnixStream connect
This commit is contained in:
Stjepan Glavina 2020-08-25 19:17:44 +02:00 committed by GitHub
parent defb205c6a
commit efaac5dc4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1180,7 +1180,7 @@ impl Async<UnixStream> {
socket
.connect(&socket2::SockAddr::unix(path)?)
.or_else(|err| {
if err.raw_os_error() == Some(libc::EINPROGRESS) {
if err.kind() == io::ErrorKind::WouldBlock {
Ok(())
} else {
Err(err)