gluon-neighbour-info: flush after writing the HTTP header

sse-multiplex likes to get the header as fast as possible.
This commit is contained in:
Matthias Schiffer 2015-12-13 18:44:04 +01:00
parent c3150d821f
commit d3bc707caa

View File

@ -206,8 +206,10 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (sse) if (sse) {
fputs("Content-Type: text/event-stream\n\n", stdout); fputs("Content-Type: text/event-stream\n\n", stdout);
fflush(stdout);
}
do { do {
ret = request(sock, &client_addr, request_string, sse, timeout, max_count); ret = request(sock, &client_addr, request_string, sse, timeout, max_count);