Full support for grpc server side

This commit is contained in:
Asim Aslam
2019-08-26 12:33:59 +01:00
parent 36623bfe50
commit 6daf4fda72
3 changed files with 59 additions and 28 deletions

View File

@@ -363,6 +363,9 @@ func (h *httpTransportSocket) Close() error {
// close the channel
close(h.closed)
// close the buffer
h.r.Body.Close()
// close the connection
if h.r.ProtoMajor == 1 {
return h.conn.Close()
@@ -436,9 +439,6 @@ func (h *httpTransportListener) Accept(fn func(Socket)) error {
closed: make(chan bool),
}
// cleanup
//defer sock.Close()
// execute the socket
fn(sock)
})