mirror of https://bitbucket.org/ausocean/av.git
connect() now constructs its packet with a buf to avoid needless packet resizing later.
This commit is contained in:
parent
969e2f4fa9
commit
fbad21bc76
|
@ -186,8 +186,10 @@ func connect(c *Conn) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.log(DebugLevel, pkg+"negotiating")
|
c.log(DebugLevel, pkg+"negotiating")
|
||||||
|
|
||||||
|
var buf [256]byte
|
||||||
for !c.isPlaying {
|
for !c.isPlaying {
|
||||||
pkt := packet{}
|
pkt := packet{buf: buf[:]}
|
||||||
err = pkt.readFrom(c)
|
err = pkt.readFrom(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue