From b3df2871d280514f3dbad8b6d7ad59a7a35e527e Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Thu, 7 Mar 2019 22:23:51 -0500 Subject: [PATCH] stupid dmd warnings are useless --- cgi.d | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cgi.d b/cgi.d index 3c35c64..17c91d4 100644 --- a/cgi.d +++ b/cgi.d @@ -5134,19 +5134,20 @@ interface EventSourceServer { version(fastcgi) throw new Exception("sending fcgi connections not supported"); + else { + auto fd = cgi.getOutputFileHandle(); + if(isInvalidHandle(fd)) + throw new Exception("bad fd from cgi!"); - auto fd = cgi.getOutputFileHandle(); - if(isInvalidHandle(fd)) - throw new Exception("bad fd from cgi!"); + EventSourceServerImplementation.SendableEventConnection sec; + sec.populate(cgi.responseChunked, eventUrl, lastEventId); - EventSourceServerImplementation.SendableEventConnection sec; - sec.populate(cgi.responseChunked, eventUrl, lastEventId); - - version(Posix) { - auto res = write_fd(s, cast(void*) &sec, sec.sizeof, fd); - assert(res == sec.sizeof); - } else version(Windows) { - // FIXME + version(Posix) { + auto res = write_fd(s, cast(void*) &sec, sec.sizeof, fd); + assert(res == sec.sizeof); + } else version(Windows) { + // FIXME + } } }