Description
The HTTP/2 spec encourages sending GOAWAY before dropping the connection. GOAWAY is necessary for "graceful" shutdowns.
When error handling:
Endpoints SHOULD send a GOAWAY frame when ending a connection, providing that circumstances permit it.
In the GOAWAY frame description section:
Endpoints SHOULD always send a GOAWAY frame before closing a connection so that the remote peer can know whether a stream has been partially processed or not.
.
A GOAWAY frame might not immediately precede closing of the connection; a receiver of a GOAWAY that has no more use for the connection SHOULD still send a GOAWAY frame before terminating the connection.
When discussing connection management:
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.