@@ -54,10 +54,10 @@ type Conn struct {
54
54
closed bool
55
55
outLck sync.RWMutex
56
56
57
- signals []chan * Signal
57
+ signals []chan <- * Signal
58
58
signalsLck sync.Mutex
59
59
60
- eavesdropped chan * Message
60
+ eavesdropped chan <- * Message
61
61
eavesdroppedLck sync.Mutex
62
62
}
63
63
@@ -203,12 +203,12 @@ func (conn *Conn) Close() error {
203
203
// sent to the appropiate channels and method calls will not be handled. If nil
204
204
// is passed, the normal behaviour is restored.
205
205
//
206
- // The caller has to make sure that c is sufficiently buffered;
207
- // if a message arrives when a write to c is not possible, the message is
206
+ // The caller has to make sure that ch is sufficiently buffered;
207
+ // if a message arrives when a write to ch is not possible, the message is
208
208
// discarded.
209
- func (conn * Conn ) Eavesdrop (c chan * Message ) {
209
+ func (conn * Conn ) Eavesdrop (ch chan <- * Message ) {
210
210
conn .eavesdroppedLck .Lock ()
211
- conn .eavesdropped = c
211
+ conn .eavesdropped = ch
212
212
conn .eavesdroppedLck .Unlock ()
213
213
}
214
214
@@ -486,10 +486,10 @@ func (conn *Conn) serials() {
486
486
// channel that already is registered will remove it from the list of the
487
487
// registered channels.
488
488
//
489
- // Thess channels are "overwritten" by Eavesdrop; i.e., if there currently is a
489
+ // These channels are "overwritten" by Eavesdrop; i.e., if there currently is a
490
490
// channel for eavesdropped messages, this channel receives all signals, and
491
491
// none of the channels passed to Signal will receive any signals.
492
- func (conn * Conn ) Signal (ch chan * Signal ) {
492
+ func (conn * Conn ) Signal (ch chan <- * Signal ) {
493
493
conn .signalsLck .Lock ()
494
494
conn .signals = append (conn .signals , ch )
495
495
conn .signalsLck .Unlock ()
0 commit comments