golang/go

x/net/http2: make Transport send GOAWAY?

Open

#18,340 建立於 2016年12月16日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Go (19,008 fork)batch import
NeedsFixhelp wanted

倉庫指標

Star
 (133,883 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

We previously debated whether the Transport should send GOAWAY frames on shutdown, but couldn't think of a useful reason why.

The spec does say:

When either endpoint chooses to close the transport-layer TCP connection, the terminating endpoint SHOULD first send a GOAWAY (Section 6.8) frame so that both endpoints can reliably determine whether previously sent frames have been processed and gracefully complete or terminate any necessary remaining tasks.

Or code is like:

        // TODO: do clients send GOAWAY too? maybe? Just Close:                                                                                           
        cc.tconn.Close()

But I'm still not quite sure why a server would care.

/cc @mnot @tombergan

貢獻者指南