ionorg / ion-sdk-go

ion sdk for golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ion-sdk-go close()

manishiitg opened this issue · comments

Your environment.

  • Version: Release or SHA
  • Browser: include version
  • Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

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?

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