mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
Reorder setChannel method
This commit is contained in:
parent
c170189efb
commit
1c9ada6413
@ -124,6 +124,12 @@ func (l *link) delChannel(ch string) {
|
|||||||
l.Unlock()
|
l.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (l *link) getChannel(ch string) time.Time {
|
||||||
|
l.RLock()
|
||||||
|
defer l.RUnlock()
|
||||||
|
return l.channels[ch]
|
||||||
|
}
|
||||||
|
|
||||||
func (l *link) setChannel(channels ...string) {
|
func (l *link) setChannel(channels ...string) {
|
||||||
l.Lock()
|
l.Lock()
|
||||||
for _, ch := range channels {
|
for _, ch := range channels {
|
||||||
@ -132,12 +138,6 @@ func (l *link) setChannel(channels ...string) {
|
|||||||
l.Unlock()
|
l.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *link) getChannel(ch string) time.Time {
|
|
||||||
l.RLock()
|
|
||||||
defer l.RUnlock()
|
|
||||||
return l.channels[ch]
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the keepalive time
|
// set the keepalive time
|
||||||
func (l *link) keepalive() {
|
func (l *link) keepalive() {
|
||||||
l.Lock()
|
l.Lock()
|
||||||
|
Loading…
Reference in New Issue
Block a user