We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there!
So I'm trying to close a room. I got a participant (client) using the server-sdk-go and another program called closer which tries to close the room.
client
server-sdk-go
closer
package main import ( "fmt" "github.com/livekit/protocol/livekit" lksdk "github.com/livekit/server-sdk-go" "github.com/thanhpk/randstr" ) func main() { host := "ws://localhost:7880" apiKey := "devkey" apiSecret := "secret" roomName := "myroom" identity := randstr.Hex(16) close := make(chan bool) roomCB := &lksdk.RoomCallback{ ParticipantCallback: lksdk.ParticipantCallback{}, OnReconnecting: func() { fmt.Print("OnReconnecting") }, OnReconnected: func() { fmt.Print("OnReconnected") }, OnDisconnected: func() { fmt.Print("OnDisconnected") close <- true }, } room, err := lksdk.ConnectToRoom(host, lksdk.ConnectInfo{ APIKey: apiKey, APISecret: apiSecret, RoomName: roomName, ParticipantIdentity: identity, }, roomCB) if err != nil { panic(err) } <-close room.Disconnect() }
package main import ( "context" "fmt" livekit "github.com/livekit/protocol/livekit" lksdk "github.com/livekit/server-sdk-go" ) func main() { host := "ws://localhost:7880" apiKey := "devkey" apiSecret := "secret" roomClient := lksdk.NewRoomServiceClient(host, apiKey, apiSecret) res_list, _ := roomClient.ListRooms(context.Background(), &livekit.ListRoomsRequest{}) roomId := res_list.GetRooms()[0].GetSid() fmt.Printf("sid: '%s'\n", roomId) res_delete, err := roomClient.DeleteRoom(context.Background(), &livekit.DeleteRoomRequest{ Room: roomId, }) fmt.Printf("res_delete: '%s', error: %v\n", res_delete.String(), err) fmt.Printf("done\n") }
So there is no error, however the room does not get closed either. Simply nothing happens. Btw when I use an invalid roomId I get no error either.
roomId
the server logs DEBUG livekit service/roommanager.go:453 Deleting non-rtc room, loading from roomstore
DEBUG livekit service/roommanager.go:453 Deleting non-rtc room, loading from roomstore
I expected that the client will get disconnected and that the signal OnDisconnected would get called.
OnDisconnected
github.com/livekit/server-sdk-go v0.10.4
docker run --rm -it --network host livekit/livekit-server:v1.1.2 --dev
Thanks for your time!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there!
So I'm trying to close a room. I got a participant (
client
) using theserver-sdk-go
and another program calledcloser
which tries to close the room.client
closer
issue
So there is no error, however the room does not get closed either. Simply nothing happens. Btw when I use an invalid
roomId
I get no error either.the server logs
DEBUG livekit service/roommanager.go:453 Deleting non-rtc room, loading from roomstore
I expected that the client will get disconnected and that the signal
OnDisconnected
would get called.versions
github.com/livekit/server-sdk-go v0.10.4
docker run --rm -it --network host livekit/livekit-server:v1.1.2 --dev
Thanks for your time!
The text was updated successfully, but these errors were encountered: