Remove mtproto pool

This commit is contained in:
9seconds
2018-07-02 15:44:52 +03:00
parent 5ea0c4f7bf
commit 6fa5f31ca8
10 changed files with 23 additions and 118 deletions
+3 -3
View File
@@ -32,8 +32,8 @@ type RPCProxyRequest struct {
Extras *mtproto.Extras
}
func (r *RPCProxyRequest) Bytes() *bytes.Buffer {
buf := mtproto.GetBuffer()
func (r *RPCProxyRequest) Bytes() []byte {
buf := &bytes.Buffer{}
flags := r.Flags
if r.Extras.QuickAck {
@@ -62,7 +62,7 @@ func (r *RPCProxyRequest) Bytes() *bytes.Buffer {
buf.Write(messageBytes)
}
return buf
return buf.Bytes()
}
func NewRPCProxyRequest(connectionType mtproto.ConnectionType, local, remote *net.TCPAddr, adTag []byte, extras *mtproto.Extras) (*RPCProxyRequest, error) {