It's official, I'm retarded

This commit is contained in:
Hamcha 2016-02-09 10:39:00 +00:00
parent b3d23a0f36
commit b94b92c2d2
3 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,7 @@ func handleClient(c net.Conn) {
err = json.Unmarshal(bytes, &cmd)
if err != nil {
log.Printf("[handleClient] Can't parse JSON: %s\r\n", err.Error())
log.Println(string(bytes))
log.Printf("%s\n", string(bytes))
continue
}
executeClientCommand(cmd)

View file

@ -40,5 +40,5 @@ func (b *Broker) SendTextMessage(chat *APIChat, text string, original *int) {
if err != nil {
log.Printf("[SendTextMessage] JSON Encode error: %s\n", err.Error())
}
fmt.Fprintln(b.Socket, data)
fmt.Fprintln(b.Socket, string(data))
}

View file

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