MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / UnregisterSession

Method UnregisterSession

datagramsession/manager.go:152–171  ·  view source on GitHub ↗
(ctx context.Context, sessionID uuid.UUID, message string, byRemote bool)

Source from the content-addressed store, hash-verified

150}
151
152func (m *manager) UnregisterSession(ctx context.Context, sessionID uuid.UUID, message string, byRemote bool) error {
153 ctx, cancel := context.WithTimeout(ctx, m.timeout)
154 defer cancel()
155 event := &unregisterSessionEvent{
156 sessionID: sessionID,
157 err: &errClosedSession{
158 message: message,
159 byRemote: byRemote,
160 },
161 }
162 select {
163 case <-ctx.Done():
164 m.log.Error().Msg("Datagram session unregistration timeout")
165 return ctx.Err()
166 case m.unregistrationChan <- event:
167 return nil
168 case <-m.closedChan:
169 return errSessionManagerClosed
170 }
171}
172
173func (m *manager) unregisterSession(unregistration *unregisterSessionEvent) {
174 session, ok := m.sessions[unregistration.sessionID]

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.45
ErrMethod · 0.45

Tested by

no test coverage detected