No need to set request in the buffer
This commit is contained in:
parent
5a5b1b8f6e
commit
991142cd57
@ -154,7 +154,7 @@ func setupProtocol(msg *transport.Message) codec.NewCodec {
|
|||||||
|
|
||||||
func newRpcCodec(req *transport.Message, socket transport.Socket, c codec.NewCodec) codec.Codec {
|
func newRpcCodec(req *transport.Message, socket transport.Socket, c codec.NewCodec) codec.Codec {
|
||||||
rwc := &readWriteCloser{
|
rwc := &readWriteCloser{
|
||||||
rbuf: bytes.NewBuffer(req.Body),
|
rbuf: bytes.NewBuffer(nil),
|
||||||
wbuf: bytes.NewBuffer(nil),
|
wbuf: bytes.NewBuffer(nil),
|
||||||
}
|
}
|
||||||
r := &rpcCodec{
|
r := &rpcCodec{
|
||||||
|
@ -81,12 +81,13 @@ func (s *rpcServer) ServeConn(sock transport.Socket) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// use Micro-Id as the stream identifier
|
// use Micro-Stream as the stream identifier
|
||||||
// in the event its blank we'll always process
|
// in the event its blank we'll always process
|
||||||
// on the same socket
|
// on the same socket
|
||||||
id := msg.Header["Micro-Stream"]
|
id := msg.Header["Micro-Stream"]
|
||||||
|
|
||||||
// if there's no stream id then its a standard request
|
// if there's no stream id then its a standard request
|
||||||
|
// use the Micro-Id
|
||||||
if len(id) == 0 {
|
if len(id) == 0 {
|
||||||
id = msg.Header["Micro-Id"]
|
id = msg.Header["Micro-Id"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user