IsInited returns true if the connection has been initialized. This is a backward-compatible wrapper around the state machine.
()
| 307 | // IsInited returns true if the connection has been initialized. |
| 308 | // This is a backward-compatible wrapper around the state machine. |
| 309 | func (cn *Conn) IsInited() bool { |
| 310 | state := cn.stateMachine.GetState() |
| 311 | // Connection is initialized if it's in IDLE or any post-initialization state |
| 312 | return state != StateCreated && state != StateInitializing && state != StateClosed |
| 313 | } |
| 314 | |
| 315 | // Used - State machine based implementation |
| 316 |