THRIFT-5495: close client when shutdown server in go lib
Client: go
diff --git a/lib/go/README.md b/lib/go/README.md
index 75d7174..b2cf1df 100644
--- a/lib/go/README.md
+++ b/lib/go/README.md
@@ -132,3 +132,27 @@
excessive cpu overhead.
This feature is also only enabled on non-oneway endpoints.
+
+A note about server stop implementations
+========================================
+
+[TSimpleServer.Stop](https://pkg.go.dev/github.com/apache/thrift/lib/go/thrift#TSimpleServer.Stop) will wait for all client connections to be closed after
+the last received request to be handled, as the time spent by Stop
+ may sometimes be too long:
+* When socket timeout is not set, server might be hanged before all active
+ clients to finish handling the last received request.
+* When the socket timeout is too long (e.g one hour), server will
+ hang for that duration before all active clients to finish handling the
+ last received request.
+
+To prevent Stop from hanging for too long, you can set
+thrift.ServerStopTimeout in your main or init function:
+
+ thrift.ServerStopTimeout = <max_duration_to_stop>
+
+If it's set to <=0, the feature will be disabled (by default), and server
+will wait for all the client connections to be closed gracefully with
+zero err time. Otherwise, the stop will wait for all the client
+connections to be closed gracefully util thrift.ServerStopTimeout is
+reached, and client connections that are not closed after thrift.ServerStopTimeout
+will be closed abruptly which may cause some client errors.
\ No newline at end of file