Ticket #5562: #5562_abstract_2.py.patch
| File #5562_abstract_2.py.patch, 1.3 KB (added by dynamicgl, 7 months ago) |
|---|
-
twisted/internet/iocpreactor/abstract.py
152 152 _writeDisconnecting = False 153 153 _writeDisconnected = False 154 154 writeBufferSize = 2**2**2**2 155 _doWriteCalling = False 155 156 156 157 157 158 def loseWriteConnection(self): … … 182 183 self._writeScheduled.cancel() 183 184 self._writeScheduled = None 184 185 self.writing = False 186 self._doWriteCalling = False 185 187 186 188 187 189 def _resumeWriting(self): 188 190 self._writeScheduled = None 189 self.doWrite() 191 if self.writing: 192 if self._doWriteCalling: 193 self.reactor.callLater(0, self._resumeWriting) 194 else: 195 self.doWrite() 190 196 191 197 192 198 def _cbWrite(self, rc, bytes, evt): 199 self._doWriteCalling = False 193 200 if self._handleWrite(rc, bytes, evt): 194 201 self.doWrite() 195 202 … … 235 242 236 243 237 244 def doWrite(self): 245 self._doWriteCalling = True 238 246 if len(self.dataBuffer) - self.offset < self.SEND_LIMIT: 239 247 # If there is currently less than SEND_LIMIT bytes left to send 240 248 # in the string, extend it with the array data.
