rtmp: add debug
This commit is contained in:
parent
bc5e321c39
commit
f4518a79aa
@ -493,22 +493,26 @@ func (self *Conn) readConnect() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *Conn) checkConnectResult() (ok bool, errmsg string) {
|
func (self *Conn) checkConnectResult() (ok bool, errmsg string) {
|
||||||
errmsg = "params invalid"
|
|
||||||
if len(self.commandparams) < 1 {
|
if len(self.commandparams) < 1 {
|
||||||
|
errmsg = "params length < 1"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
obj, _ := self.commandparams[0].(flvio.AMFMap)
|
obj, _ := self.commandparams[0].(flvio.AMFMap)
|
||||||
if obj == nil {
|
if obj == nil {
|
||||||
|
errmsg = "params[0] not object"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_code, _ := obj["code"]
|
_code, _ := obj["code"]
|
||||||
if _code == nil {
|
if _code == nil {
|
||||||
|
errmsg = "code invalid"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code, _ := _code.(string)
|
code, _ := _code.(string)
|
||||||
if code != "NetConnection.Connect.Success" {
|
if code != "NetConnection.Connect.Success" {
|
||||||
|
errmsg = "code != NetConnection.Connect.Success"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user