Merge pull request #4830 from yyforyongyu/small-code-fix

multi: small code fix
This commit is contained in:
Conner Fromknecht 2020-12-08 12:28:29 -08:00 committed by GitHub
commit ebb83bc0a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

@ -516,7 +516,14 @@ func (l *channelLink) Stop() {
l.cfg.ChainEvents.Cancel() l.cfg.ChainEvents.Cancel()
} }
l.updateFeeTimer.Stop() // Ensure the channel for the timer is drained.
if !l.updateFeeTimer.Stop() {
select {
case <-l.updateFeeTimer.C:
default:
}
}
l.hodlQueue.Stop() l.hodlQueue.Stop()
close(l.quit) close(l.quit)

@ -124,7 +124,7 @@ func (c *Error) MsgType() MessageType {
// This is part of the lnwire.Message interface. // This is part of the lnwire.Message interface.
func (c *Error) MaxPayloadLength(uint32) uint32 { func (c *Error) MaxPayloadLength(uint32) uint32 {
// 32 + 2 + 65501 // 32 + 2 + 65501
return 65535 return MaxMessagePayload
} }
// isASCII is a helper method that checks whether all bytes in `data` would be // isASCII is a helper method that checks whether all bytes in `data` would be