mirror of
https://github.com/livekit/livekit.git
synced 2026-06-08 06:32:18 +00:00
Defer close of source and sink to prevent error logs. (#2149)
When a room is created via room service, when `StartSession` runs, it sees a closed request source and returns an error and that gets logged. It is not a real error. Defer the sink and source close so that room creation can finish without errors.
This commit is contained in:
@@ -84,8 +84,8 @@ func (s *RoomService) CreateRoom(ctx context.Context, req *livekit.CreateRoomReq
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sink.Close()
|
||||
source.Close()
|
||||
defer sink.Close()
|
||||
defer source.Close()
|
||||
|
||||
// ensure it's created correctly
|
||||
err = s.confirmExecution(func() error {
|
||||
|
||||
Reference in New Issue
Block a user