From d3bc707caad3147016b1c860cbd0409a8d7095d6 Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 13 Dec 2015 18:44:04 +0100
Subject: [PATCH] gluon-neighbour-info: flush after writing the HTTP header

sse-multiplex likes to get the header as fast as possible.
---
 package/gluon-neighbour-info/src/gluon-neighbour-info.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/gluon-neighbour-info/src/gluon-neighbour-info.c b/package/gluon-neighbour-info/src/gluon-neighbour-info.c
index b2652bcc8..71bcf391a 100644
--- a/package/gluon-neighbour-info/src/gluon-neighbour-info.c
+++ b/package/gluon-neighbour-info/src/gluon-neighbour-info.c
@@ -206,8 +206,10 @@ int main(int argc, char **argv) {
     exit(EXIT_FAILURE);
   }
 
-  if (sse)
+  if (sse) {
     fputs("Content-Type: text/event-stream\n\n", stdout);
+    fflush(stdout);
+  }
 
   do {
     ret = request(sock, &client_addr, request_string, sse, timeout, max_count);
-- 
GitLab