##// END OF EJS Templates
cmdserver: write channel header and payload by a single write() call...
Yuya Nishihara -
r30263:7f231345 default
parent child Browse files
Show More
@@ -54,8 +54,8 b' class channeledoutput(object):'
54 def write(self, data):
54 def write(self, data):
55 if not data:
55 if not data:
56 return
56 return
57 self.out.write(struct.pack('>cI', self.channel, len(data)))
57 # single write() to guarantee the same atomicity as the underlying file
58 self.out.write(data)
58 self.out.write(struct.pack('>cI', self.channel, len(data)) + data)
59 self.out.flush()
59 self.out.flush()
60
60
61 def __getattr__(self, attr):
61 def __getattr__(self, attr):
General Comments 0
You need to be logged in to leave comments. Login now