rough-minister-58256
08/24/2015, 6:16 PMbored-art-40741
08/24/2015, 6:16 PMbored-art-40741
08/24/2015, 6:16 PMwitty-crayon-22786
08/24/2015, 6:16 PMwitty-crayon-22786
08/24/2015, 6:16 PMcuddly-architect-27013
08/24/2015, 6:17 PMrough-minister-58256
08/24/2015, 6:20 PMrough-minister-58256
08/24/2015, 6:20 PMrough-minister-58256
08/24/2015, 6:22 PMrough-minister-58256
08/24/2015, 6:22 PMbored-art-40741
08/24/2015, 6:38 PMbored-art-40741
08/24/2015, 6:40 PMbored-art-40741
08/24/2015, 6:44 PMdef _read_chunk(self, buff):
while len(buff) < self.HEADER_LENGTH:
buff += self._sock.recv(self.BUFF_SIZE)
payload_length, command = struct.unpack(self.HEADER_FMT, buff[:self.HEADER_LENGTH])
buff = buff[self.HEADER_LENGTH:]
while len(buff) < payload_length:
buff += self._sock.recv(self.BUFF_SIZE)
payload = buff[:payload_length]
rest = buff[payload_length:]
return command, payload, rest
bored-art-40741
08/24/2015, 6:44 PMbored-art-40741
08/24/2015, 6:44 PMself._sock.recv
blocking?bored-art-40741
08/24/2015, 6:46 PMself._sock.recv
is emptybored-art-40741
08/24/2015, 6:49 PMbored-art-40741
08/24/2015, 6:50 PMbored-art-40741
08/24/2015, 6:52 PMbored-art-40741
08/24/2015, 6:54 PMbored-art-40741
08/24/2015, 6:55 PMbored-art-40741
08/24/2015, 7:19 PMself._sock.recv
is empty, which I'm now very confident is handled incorrectlybored-art-40741
08/24/2015, 7:19 PMbored-art-40741
08/24/2015, 7:22 PMbored-art-40741
08/24/2015, 7:22 PMrough-minister-58256
08/24/2015, 7:28 PMself._sock.recv
is empty” <— yeah, I think this is a likely culprit in the “hangs forever doing socket reads from a dead nailgun” scenario and seems to be a long-standing bit of code. doesn’t explain why the nailgun died to begin with tho.rough-minister-58256
08/24/2015, 7:29 PMrough-minister-58256
08/24/2015, 7:30 PMbored-art-40741
08/24/2015, 7:33 PMbored-art-40741
08/24/2015, 7:33 PM