ionorg / ion-sdk-go

ion sdk for golang
MIT License
55 stars 46 forks source link

ion-sdk-go close() #36

Open manishiitg opened 3 years ago

manishiitg commented 3 years ago

Your environment.

What did you do?

when i call Close(), it doesn't really disconnection the session from ion-sfu? the session remains still active. Close session is not called on ion-sfu. is this a bug or i am doing something wrong?

What did you expect?

What happened?

manishiitg commented 3 years ago

there is a major issue here to lock getting stuck

https://github.com/pion/ion-sdk-go/blob/master/engine.go#L65 DelClient internally calls c.Close() and c.Close() will call e.DelClient https://github.com/pion/ion-sdk-go/blob/26d31be8c6027b86740a34f12838c053b1270abd/client.go#L270

but it doesn't release the lock so the code gets stuck waiting for lock