Skip to content

Commit c7c577e

Browse files
committed
godoc: add a note about Shutdown state
We forgot to update a comment about the state. Part of #257
1 parent d6ede31 commit c7c577e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

connection.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ const (
3737
Disconnected
3838
// ReconnectFailed signals that attempt to reconnect has failed.
3939
ReconnectFailed
40-
// Either reconnect attempts exhausted, or explicit Close is called.
41-
Closed
4240
// Shutdown signals that shutdown callback is processing.
4341
Shutdown
42+
// Either reconnect attempts exhausted, or explicit Close is called.
43+
Closed
4444

4545
// LogReconnectFailed is logged when reconnect attempt failed.
4646
LogReconnectFailed ConnLogKind = iota + 1
@@ -109,6 +109,11 @@ func (d defaultLogger) Report(event ConnLogKind, conn *Connection, v ...interfac
109109
// - In "Disconnected" state it rejects queries with ClientError{Code:
110110
// ErrConnectionNotReady}
111111
//
112+
// - In "Shutdown" state it rejects queries with ClientError{Code:
113+
// ErrConnectionShutdown}. The state indicates that a graceful shutdown
114+
// in progress. The connection waits for all active requests to
115+
// complete.
116+
//
112117
// - In "Closed" state it rejects queries with ClientError{Code:
113118
// ErrConnectionClosed}. Connection could become "Closed" when
114119
// Connection.Close() method called, or when Tarantool disconnected and

0 commit comments

Comments
 (0)