only continue to stream when its a stream
This commit is contained in:
parent
58bc4c103f
commit
5a5b1b8f6e
@ -42,6 +42,11 @@ type Proxy struct {
|
|||||||
|
|
||||||
// read client request and write to server
|
// read client request and write to server
|
||||||
func readLoop(r server.Request, s client.Stream) error {
|
func readLoop(r server.Request, s client.Stream) error {
|
||||||
|
// we don't loop unless its a stream
|
||||||
|
if !r.Stream() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// request to backend server
|
// request to backend server
|
||||||
req := s.Request()
|
req := s.Request()
|
||||||
|
|
||||||
@ -266,6 +271,11 @@ func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server
|
|||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we don't continue unless its a stream
|
||||||
|
if !req.Stream() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user