diff options
| author | ruki <[email protected]> | 2019-10-27 21:59:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-10-27 21:59:08 +0800 |
| commit | fa792567b7df02cf604863589b33405c0c921f54 (patch) | |
| tree | 901829f5e5460de1d085a80a42cfad3e6b57710f /xmake/core/base/socket.lua | |
| parent | 433872bafb966f4c5d613f0a65795bf54149fdcd (diff) | |
concat socket.recv data
Diffstat (limited to 'xmake/core/base/socket.lua')
| -rw-r--r-- | xmake/core/base/socket.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/base/socket.lua b/xmake/core/base/socket.lua index 31f23389d..a90659659 100644 --- a/xmake/core/base/socket.lua +++ b/xmake/core/base/socket.lua @@ -241,10 +241,10 @@ function _instance:recv(size, opt) local recv = 0 local real = 0 local wait = false - local data_or_errors = nil + local data_or_errors = opt.prevdata if opt.block then while recv < size do - real, data_or_errors = io.socket_recv(self._SOCK, size - recv) + real, data_or_errors = io.socket_recv(self._SOCK, size - recv, data_or_errors) if real > 0 then recv = recv + real wait = false |
