MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / PinSession

Method PinSession

internal/sessions/manager.go:193–201  ·  view source on GitHub ↗

PinSession marks a session as bridge-pinned so it won't be garbage collected.

(sessionID string)

Source from the content-addressed store, hash-verified

191
192// PinSession marks a session as bridge-pinned so it won't be garbage collected.
193func (m *Manager) PinSession(sessionID string) {
194 sess := m.Get(sessionID)
195 if sess == nil {
196 return
197 }
198 sess.mu.Lock()
199 sess.BridgePinned = true
200 sess.mu.Unlock()
201}
202
203// PendingActionCount returns the number of pending actions for a session.
204func (m *Manager) PendingActionCount(sessionID string) int {

Callers 2

onNewSessionMethod · 0.80

Calls 1

GetMethod · 0.95

Tested by 1