mirror of https://bitbucket.org/ausocean/av.git
revid: multiSender active=>isActive
This commit is contained in:
parent
caff9eddaa
commit
4881e179cc
|
@ -55,7 +55,7 @@ type Sender interface {
|
|||
// multiSender allows for the sending through multi loadSenders using a single
|
||||
// call to multiSender.Write.
|
||||
type multiSender struct {
|
||||
active func() bool
|
||||
isActive func() bool
|
||||
senders []loadSender
|
||||
retry bool
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ func newMultiSender(senders []loadSender, active func() bool) *multiSender {
|
|||
}
|
||||
s := &multiSender{
|
||||
senders: senders,
|
||||
active: active,
|
||||
isActive: active,
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ func newMultiSender(senders []loadSender, active func() bool) *multiSender {
|
|||
func (s *multiSender) Write(d []byte) (int, error) {
|
||||
for _, sender := range s.senders {
|
||||
sender.load(d)
|
||||
for s.active() {
|
||||
for s.isActive() {
|
||||
err := sender.send()
|
||||
if err != nil {
|
||||
sender.handleSendFail(err)
|
||||
|
|
Loading…
Reference in New Issue