Method
AddCloseCallback
(handler, key interface{}, f func())
Source from the content-addressed store, hash-verified
| 611 | } |
| 612 | |
| 613 | func (s *WsConnection) AddCloseCallback(handler, key interface{}, f func()) { |
| 614 | if s.isClosed { |
| 615 | return |
| 616 | } |
| 617 | s.closeCallbackMutex.Lock() |
| 618 | defer s.closeCallbackMutex.Unlock() |
| 619 | s.closeCallback.Add(handler, key, f) |
| 620 | } |
| 621 | |
| 622 | func (s *WsConnection) RemoveCloseCallback(handler, key interface{}) { |
| 623 | if s.isClosed { |
Callers
nothing calls this directly
Tested by
no test coverage detected