[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Handling network disconnects during read
From: |
Michael Welsh Duggan |
Subject: |
Handling network disconnects during read |
Date: |
Fri, 09 Oct 2009 10:54:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
I've been encountering a problem using gnutls_record_recv() using old
versions of gnutls, and I want to find out if a) current versions are
not subject to this problem, or b) there is a decent workaround to this
problem that I have not considered. The version of gnutls that I am
currently constrained to work with is v1.4.1.
I am reading data using gnutls_record_recv(). I am using select() to
determine whether there is data available on that socket before calling
gnutls_record_recv(). Internally, gnutls_record_recv() appears to be
doing multiple recv calls until "enough" data is read. If a network
disconnect happens in between recv calls in such a way that the os
cannot determine that the connection is disconnected, then the recv
call blocks. This currently hangs my software.
I have a potential workaround I am looking at involving writing my own
pull function, but I am not particularly happy with it. Any
suggestions?
--
Michael Welsh Duggan
(address@hidden)
- Handling network disconnects during read,
Michael Welsh Duggan <=