And the fix wasn't right

This commit is contained in:
Hamcha 2016-02-20 22:35:26 +01:00
parent f1aae4f2a4
commit 47ea2b9324
2 changed files with 3 additions and 3 deletions

View File

@ -46,10 +46,10 @@ func handleClient(c net.Conn) {
// Get command
var cmd tg.ClientCommand
err = json.Unmarshal(bytes, &cmd)
err = json.Unmarshal(buf, &cmd)
if err != nil {
log.Printf("[handleClient] Can't parse JSON: %s\r\n", err.Error())
log.Printf("%s\n", string(bytes))
log.Printf("%s\n", string(buf))
continue
}

View File

@ -39,7 +39,7 @@ func CreateBrokerClient(brokerAddr string, updateFn UpdateHandler) error {
err = json.Unmarshal(buf, &update)
if err != nil {
log.Printf("[tg - CreateBrokerClient] ERROR reading JSON: %s\r\n", err.Error())
log.Printf("%s\n", string(bytes))
log.Printf("%s\n", string(buf))
continue
}