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
Signed by: Kerblif
GPG Key ID: 5AFAD6640F4670C3

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