Remove unused counter logic in live source callback
The incrementing counter and related condition were unnecessary and have been removed. This simplifies the callback function and improves code clarity without altering functionality.
This commit is contained in:
parent
edc86fb706
commit
26f354d82d
@ -116,16 +116,8 @@ func handleLogin(sPack *smart.SmartPackage, pack protocol.Package) (err error) {
|
||||
|
||||
go videoPack.Run()
|
||||
|
||||
i := 0
|
||||
|
||||
videoPack.AddLiveSource(2, func(data []byte) error {
|
||||
fmt.Println("Есть контакт!")
|
||||
|
||||
i++
|
||||
|
||||
if i > 10 {
|
||||
return errors.New("я устал")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user