Fix the udp api to use json.UseNumber()

pull/692/head
John Shahid 2014-06-25 14:09:34 -04:00
parent cb7d361265
commit dc2cb48952
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package udp
import (
"bytes"
"cluster"
. "common"
"coordinator"
@ -72,7 +73,9 @@ func (self *Server) HandleSocket(socket *net.UDPConn) {
}
serializedSeries := []*SerializedSeries{}
err = json.Unmarshal(buffer[0:n], &serializedSeries)
decoder := json.NewDecoder(bytes.NewBuffer(buffer[0:n]))
decoder.UseNumber()
err = decoder.Decode(&serializedSeries)
if err != nil {
log.Error("UDP json error: %s", err)
continue