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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
sink.Close()
|
defer sink.Close()
|
||||||
source.Close()
|
defer source.Close()
|
||||||
|
|
||||||
// ensure it's created correctly
|
// ensure it's created correctly
|
||||||
err = s.confirmExecution(func() error {
|
err = s.confirmExecution(func() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user