ionorg / ion

Real-Distributed RTC System by pure Go and Flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why compare objects?

sssgun opened this issue · comments

https://github.com/pion/ion/blob/daafc471f157ce7d62901450d42f0c30e2a85891/apps/biz/server/server.go#L80

AS-IS

	if s.rooms[id] == r {
		delete(s.rooms, id)
	}

TO-BE

	if s.rooms[id] != nil {
		delete(s.rooms, id)
	}

Is the modified code correct?

commented

yep, same result, but seem your code is clearly, fixed