| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // This file contains code in the impl package that we only want built for tests |
| // (it exposes public API methods that we don't want to normally expose). |
| func (c *callbackState) leaking() bool { |
| return len(c.channels) > 0 |
| func DispatcherLeaking(d rpc.Dispatcher) bool { |
| return obj.internal.callback.leaking() |
| case *testModeDispatcher: |
| return obj.realDispatcher.(*dispatcher).internal.callback.leaking() |
| panic(fmt.Sprintf("unexpected type: %T", d)) |