Set store a TerminalSession to SessionMap
(sessionId string, session TerminalSession)
| 154 | |
| 155 | // Set store a TerminalSession to SessionMap |
| 156 | func (sm *SessionMap) Set(sessionId string, session TerminalSession) { |
| 157 | sm.Lock.Lock() |
| 158 | defer sm.Lock.Unlock() |
| 159 | session.TimeOut = time.Now().Add(SessionTerminalStoreTime * time.Minute) |
| 160 | sm.Sessions[sessionId] = session |
| 161 | } |
| 162 | |
| 163 | // Close shuts down the SockJS connection and sends the status code and reason to the client |
| 164 | // Can happen if the process exits or if there is an error starting up the process |
no test coverage detected