Skip to content

Commit

Permalink
fix ucx buffer of size 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengjieLi28 committed Jul 31, 2023
1 parent 5dc27f4 commit 902da90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/xoscar/backends/communication/ucx.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ async def send_buffers(self, buffers: list, meta: Optional[_MessageBase] = None)
for buf in meta_buffers:
await self.ucp_endpoint.send(buf)
for buffer in buffers:
if buffer.nbytes if hasattr(buffer, "nbytes") else len(buffer) > 0:
await self.ucp_endpoint.send(buffer)
await self.ucp_endpoint.send(buffer)
except ucp.exceptions.UCXBaseException: # pragma: no cover
self.abort()
raise ChannelClosed("While writing, the connection was closed")
Expand Down

0 comments on commit 902da90

Please sign in to comment.