kill another make()
This commit is contained in:
parent
c37686a724
commit
44d3cc7daf
|
@ -397,9 +397,8 @@ func (w *reply) writeClient(p []byte) (n int, err os.Error) {
|
||||||
return 0, io.ErrShortBuffer
|
return 0, io.ErrShortBuffer
|
||||||
}
|
}
|
||||||
for a := 0; a < w.Client().Attempts; a++ {
|
for a := 0; a < w.Client().Attempts; a++ {
|
||||||
l := make([]byte, 2)
|
a, b := packUint16(uint16(len(p)))
|
||||||
l[0], l[1] = packUint16(uint16(len(p)))
|
n, err = w.conn.Write([]byte{a, b})
|
||||||
n, err = w.conn.Write(l)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if e, ok := err.(net.Error); ok && e.Timeout() {
|
if e, ok := err.(net.Error); ok && e.Timeout() {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue