소스 검색

ExtendedConn.HandleJsonMessage: call jsonParseError

In case of something goes wrong for parsing the message as JSON message,
we should tell this the error handler.
Jörg Sommer 6 년 전
부모
커밋
3c7d77a456
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      whatsapp-ext/jsonmessage.go

+ 1 - 0
whatsapp-ext/jsonmessage.go

@@ -68,6 +68,7 @@ func (ext *ExtendedConn) HandleJsonMessage(message string) {
 	msg := JSONMessage{}
 	err := json.Unmarshal([]byte(message), &msg)
 	if err != nil || len(msg) < 2 {
+		ext.jsonParseError(err)
 		return
 	}