Coder Social home page Coder Social logo

panic: close of closed channel about ion-sdk-go HOT 3 OPEN

ionorg avatar ionorg commented on May 13, 2024
panic: close of closed channel

from ion-sdk-go.

Comments (3)

manishiitg avatar manishiitg commented on May 13, 2024

i think the issue is that when we do Close(), it interally calls delete and which again calls Close so it panics always

https://github.com/pion/ion-sdk-go/blob/master/client.go#L270

https://github.com/pion/ion-sdk-go/blob/1e8126477a4c28444a8b873d63aa6faf37078108/engine.go#L58

from ion-sdk-go.

manishiitg avatar manishiitg commented on May 13, 2024

also client Close should internally Stop the webm producer as well, if its being used

from ion-sdk-go.

brucekim avatar brucekim commented on May 13, 2024

I suffer from the same issue.

Client.Close() calls Engine.DelClient() which calls Client.Close() again. This makes panic since it tries to close the closed channel, c.notify here.

Is there any reason that Engine.DelClient() does c.Close() again?

// DelClient delete a client
func (e *Engine) DelClient(c *Client) error {
	e.Lock()
	if e.clients[c.sid] == nil {
		e.Unlock()
		return errInvalidSessID
	}
/*
	if c, ok := e.clients[c.sid][c.uid]; ok && (c != nil) {
		c.Close()
	}
*/
	delete(e.clients[c.sid], c.uid)
	e.Unlock()
	return nil
}

from ion-sdk-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.