Changeset 44b47a085a3312bcaf73253fde40e4f9781f12a1
- Timestamp:
- 07/14/11 16:25:01
(2 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1310660701 -0400
- git-parent:
[a29e7fc578381672499281e5e8a970082194417f]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1310660701 -0400
- Message:
If the livestream request data wasn't read in one go (i.e. EAGAIN was
hit), then it would recreate the context from scratch and attempt to
reread the whole request which would hang indefinitely and leak a jcl
context. This only seemed to present itself with hangle on with
localhost. Bug fixed.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r47504ca |
r44b47a0 |
|
| 233 | 233 | if(!ac->service_ctx || !jcl->feed) { |
|---|
| 234 | 234 | int len; |
|---|
| 235 | | jcl = ac->service_ctx = noit_livestream_closure_alloc(); |
|---|
| | 235 | if(!ac->service_ctx) ac->service_ctx = noit_livestream_closure_alloc(); |
|---|
| | 236 | jcl = ac->service_ctx; |
|---|
| 236 | 237 | /* Setup logger to this channel */ |
|---|
| | 238 | noitL(noit_debug, "livestream initializing on fd %d\n", e->fd); |
|---|
| 237 | 239 | if(!jcl->period) { |
|---|
| 238 | 240 | u_int32_t nperiod; |
|---|
| … | … | |
| 245 | 247 | goto socket_error; |
|---|
| 246 | 248 | } |
|---|
| | 249 | noitL(noit_debug, "livestream initializing on fd %d [period %d]\n", |
|---|
| | 250 | e->fd, jcl->period); |
|---|
| 247 | 251 | } |
|---|
| 248 | 252 | while(jcl->uuid_read < 36) { |
|---|
| … | … | |
| 257 | 261 | goto socket_error; |
|---|
| 258 | 262 | } |
|---|
| | 263 | noitL(noit_debug, "livestream initializing on fd %d [uuid %s]\n", |
|---|
| | 264 | e->fd, jcl->uuid_str); |
|---|
| 259 | 265 | |
|---|
| 260 | 266 | jcl->feed = malloc(32); |
|---|