kill another make()

This commit is contained in:
Miek Gieben 2011-08-09 13:15:25 +02:00
parent c37686a724
commit 44d3cc7daf
1 changed files with 2 additions and 3 deletions

View File

@ -397,9 +397,8 @@ func (w *reply) writeClient(p []byte) (n int, err os.Error) {
return 0, io.ErrShortBuffer
}
for a := 0; a < w.Client().Attempts; a++ {
l := make([]byte, 2)
l[0], l[1] = packUint16(uint16(len(p)))
n, err = w.conn.Write(l)
a, b := packUint16(uint16(len(p)))
n, err = w.conn.Write([]byte{a, b})
if err != nil {
if e, ok := err.(net.Error); ok && e.Timeout() {
continue