mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1037642 - Fix assumption that we will be able to send all data in devicemanagerSUT in one shot. r=mcote
This commit is contained in:
parent
d7c2bb1939
commit
eca294eaa0
@ -200,10 +200,13 @@ class DeviceManagerSUT(DeviceManager):
|
||||
raise DMError("Remote Device Error: our cmd was %s bytes and we "
|
||||
"only sent %s" % (len(cmdline), sent))
|
||||
if cmd.get('data'):
|
||||
sent = self._sock.send(cmd['data'])
|
||||
if sent != len(cmd['data']):
|
||||
raise DMError("Remote Device Error: we had %s bytes of data to send, but "
|
||||
"only sent %s" % (len(cmd['data']), sent))
|
||||
totalsent = 0
|
||||
while totalsent < len(cmd['data']):
|
||||
sent = self._sock.send(cmd['data'][totalsent:])
|
||||
self._logger.debug("sent %s bytes of data payload" % sent)
|
||||
if sent == 0:
|
||||
raise DMError("Socket connection broken when sending data")
|
||||
totalsent += sent
|
||||
|
||||
self._logger.debug("sent cmd: %s" % cmd['cmd'])
|
||||
except socket.error, msg:
|
||||
|
Loading…
Reference in New Issue
Block a user