libfetch: Fix hang due to SSL server closing before read completes
authorJohn Marino <draco@marino.st>
Thu, 1 Nov 2012 19:31:08 +0000 (20:31 +0100)
committerJohn Marino <draco@marino.st>
Thu, 1 Nov 2012 21:56:18 +0000 (22:56 +0100)
commit5807cf3c35db5fe11789b11a0bbdc96210746d1f
tree5fd23a8c1aea446bea81126676b5dc7ef66b4bce
parentba1d801e083c520ff4cb89128deda9b887d6fd0b
libfetch: Fix hang due to SSL server closing before read completes

If the server sends a close notification before before a SSL read
operation is complete, fetch will hang.  Fix this by reworking
fetch_read() to use non-blocking sockets.

Taken-From: FreeBSD SVN 210568 (28 JUL 2010)
Taken-From: FreeBSD SVN 214256 (23 OCT 2010)
lib/libfetch/common.c