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:
2025-05-16 17:43:51 +03:00
parent edc86fb706
commit 26f354d82d

View File

@ -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
})