]> www.average.org Git - loctrkd.git/commitdiff
wsgateway: reclassify http write hack as permanent
authorEugene Crosser <crosser@average.org>
Tue, 31 May 2022 22:36:50 +0000 (00:36 +0200)
committerEugene Crosser <crosser@average.org>
Tue, 31 May 2022 22:36:50 +0000 (00:36 +0200)
gps303/wsgateway.py

index c0a47768254bff754a2425ea1cd40ae597002a06..c344e883bacd2c567b3966ac4b052123edc7255b 100644 (file)
@@ -152,7 +152,11 @@ class Client:
                 e,
             )
             self.ws_data = try_http(data, self.sock.fileno(), e)
-            self.write()  # TODO this is a hack
+            # this `write` is a hack - writing _ought_ to be done at the
+            # stage when all other writes are performed. But I could not
+            # arrange it so in a logical way. Let it stay this way. The
+            # whole http server affair is a hack anyway.
+            self.write()
             log.debug("Sending HTTP response to %d", self.sock.fileno())
             msgs = None
         else: