Fix logdog client library on windows.

LOGDOG_STREAM_SERVER_PATH is set to e.g. `net.pipe:LUCILogDogKitchen_1176`
on bots, but the file to open is '\\.\pipe\LUCILogDogKitchen_1176'.

Additionally, specify no-buffering and '+' mode to prevent python from
hanging onto bytes it shouldn't keep and allow the pipe to be re-opened
for multiple streams in the same python process.

Bug: 959887
Change-Id: Iff15fb9de9e39552fc7b063c66e6fbeb6f677d61
Auto-Submit: Robbie Iannucci <>
Commit-Queue: Andrii Shyshkalov <>
Reviewed-by: Andrii Shyshkalov <>
GitOrigin-RevId: 90b6d0451314bb57c1e5e45f924478cc34c7f3cc
diff --git a/ b/
index 7e02772..5952f66 100644
--- a/
+++ b/
@@ -528,14 +528,14 @@
       name (str): The name of the Windows named pipe to use (e.g., "\\.\name")
     super(_NamedPipeStreamClient, self).__init__(**kwargs)
-    self._name = name
+    self._name = '\\\\.\\pipe\\' + name
   def _create(cls, value, **kwargs):
     return cls(value, **kwargs)
   def _connect_raw(self):
-    return open(self._name, 'wb')
+    return open(self._name, 'wb+', buffering=0)
 _default_registry.register_protocol('net.pipe', _NamedPipeStreamClient)