Skip to content

Commit 585a220

Browse files
committed
fix protocol trailer implementation
1 parent ed2d981 commit 585a220

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

livekit-rtc/livekit/rtc/data_stream.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async def _send_chunk(self, chunk: proto_DataStream.Chunk):
211211

212212
async def _send_trailer(self, trailer: proto_DataStream.Trailer):
213213
req = proto_ffi.FfiRequest(
214-
send_stream_trailer=proto_room.SendStreamTrailer(
214+
send_stream_trailer=proto_room.SendStreamTrailerRequest(
215215
trailer=trailer,
216216
local_participant_handle=self._local_participant._ffi_handle.handle,
217217
)
@@ -231,7 +231,9 @@ async def _send_trailer(self, trailer: proto_DataStream.Trailer):
231231
raise PublishDataError(cb.send_stream_trailer.error)
232232

233233
async def close(self):
234-
await self._send_trailer()
234+
await self._send_trailer(
235+
trailer=proto_DataStream.Trailer(stream_id=self._header.stream_id)
236+
)
235237

236238

237239
class TextStreamWriter(BaseStreamWriter):

0 commit comments

Comments
 (0)