Re: [OpenWrt-Devel] [PATCH uclient] http: wait for socket to be ready before using it

2015-01-15 Thread Rafał Miłecki
On 15 January 2015 at 13:17, Felix Fietkau wrote: > On 2015-01-15 12:50, Rafał Miłecki wrote: >> This is required as we use USOCK_NONBLOCK. > Are you sure? Theoretically, ustream should already handle it properly. > The first write fails if the socket is not connected yet, so ustream > will buffer

Re: [OpenWrt-Devel] [PATCH uclient] http: wait for socket to be ready before using it

2015-01-15 Thread Felix Fietkau
On 2015-01-15 12:50, Rafał Miłecki wrote: > This is required as we use USOCK_NONBLOCK. Are you sure? Theoretically, ustream should already handle it properly. The first write fails if the socket is not connected yet, so ustream will buffer the data and send it out again once epoll tells it that the

[OpenWrt-Devel] [PATCH uclient] http: wait for socket to be ready before using it

2015-01-15 Thread Rafał Miłecki
This is required as we use USOCK_NONBLOCK. Signed-off-by: Rafał Miłecki --- uclient-http.c | 5 + uclient.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/uclient-http.c b/uclient-http.c index c25e52f..82bef8a 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -108,6 +108,7 @@