Closed megabuz closed 9 years ago
Hi @megabuz
Please, split the issue on different "problems".
Receive old messages without comma separators is a expected behavior. You should put the comma on your template or use the JSONP support specifying a callback function when subscribing, take a look on examples. The basic long polling support don't set this because it is a generic protocol. It can have other uses, so the module do not "change the messages".
About the NGX_AGAIN it is a known issue and will be fixed on future version. From now you can increase the output buffers of sockets on you O.S. to minimize the number of errors or limit the publish message size.
Regards
Receive old messages without comma separators is a expected behavior
Yes i know. I wrote "error in JSONP" in title
About the NGX_AGAIN it is a known issue and will be fixed on future version.
Thanks!
Can you send me how to reproduce the "error in JSONP" you are getting?
I think you right about buffer size. I generated several big messages and use backlog option in pushstream.js to got it
in ngx_http_push_stream_module_utils.c line 517 https://github.com/wandenberg/nginx-push-stream-module/blob/master/src/ngx_http_push_stream_module_utils.c#L517 i got rc = NGX_AGAIN, so line 522 didn't work, and NGX_HTTP_PUSH_STREAM_CALLBACK_MID_CHUNK didn't write in buffer
The problem with NGX_AGAIN was solved on 0.5.1 tag (a48ca949427b782fba1722932f4881850c50b9f1)
sometimes i get array of messages without comma separators
sometimes ngx_http_output_filter returns NGX_AGAIN (maybe when i have big message). So in ngx_http_push_stream_module_utils.c (line 516)
rc can be NGX_AGAIN
i found answer in http://mailman.nginx.org/pipermail/nginx/2007-September/001791.html
Can you fix this error? Thanks