diff options
-rw-r--r-- | ot_http.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -139,7 +139,10 @@ ssize_t http_sendiovecdata( const int64 sock, struct ot_workstruct *ws, int iove | |||
139 | array_reset( &cookie->request ); | 139 | array_reset( &cookie->request ); |
140 | 140 | ||
141 | /* If we came here, wait for the answer is over */ | 141 | /* If we came here, wait for the answer is over */ |
142 | cookie->flag &= ~STRUCT_HTTP_FLAG_WAITINGFORTASK; | 142 | if (cookie->flag & STRUCT_HTTP_FLAG_WAITINGFORTASK) { |
143 | io_dontwantread( sock ); | ||
144 | cookie->flag &= ~STRUCT_HTTP_FLAG_WAITINGFORTASK; | ||
145 | } | ||
143 | 146 | ||
144 | fprintf(stderr, "http_sendiovecdata sending %d iovec entries found cookie->batch == %p\n", iovec_entries, cookie->batch); | 147 | fprintf(stderr, "http_sendiovecdata sending %d iovec entries found cookie->batch == %p\n", iovec_entries, cookie->batch); |
145 | 148 | ||
@@ -207,7 +210,6 @@ fprintf(stderr, "http_sendiovecdata adds a terminating 0 size buffer to batch\n" | |||
207 | /* writeable sockets timeout after 10 minutes */ | 210 | /* writeable sockets timeout after 10 minutes */ |
208 | taia_now( &t ); taia_addsec( &t, &t, OT_CLIENT_TIMEOUT_SEND ); | 211 | taia_now( &t ); taia_addsec( &t, &t, OT_CLIENT_TIMEOUT_SEND ); |
209 | io_timeout( sock, t ); | 212 | io_timeout( sock, t ); |
210 | io_dontwantread( sock ); | ||
211 | fprintf (stderr, "http_sendiovecdata marks socket %lld as wantwrite\n", sock); | 213 | fprintf (stderr, "http_sendiovecdata marks socket %lld as wantwrite\n", sock); |
212 | io_wantwrite( sock ); | 214 | io_wantwrite( sock ); |
213 | return 0; | 215 | return 0; |