p2p: Fall back to blocking sockets if the async connection fails
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 22 May 2013 16:12:56 +0000 (18:12 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 22 May 2013 16:29:50 +0000 (18:29 +0200)
commit64dc6d595238c27f7e95c9a3722ac73577eb673f
tree5bc348ff1d375fc1b6d31de5a49716eb981d1e85
parent2d0abdde3120a217eeb194244a3778ee256ee5e4
p2p: Fall back to blocking sockets if the async connection fails

Due to a kernel bug, trying to connect through a non blocking socket
may fail and return POLLHUP. In that case the connection procedure falls
back to using blocking sockets and this needs to be delayed until the
kernel sends a DM to the peer.
This is slightly hackish but this code path should get obsolete once
neard runs on top of 3.10 or later kernels.
plugins/p2p.c