htlcswitch/switch: remove unnecessary defer closure

This commit is contained in:
Conner Fromknecht 2018-07-27 03:47:15 -07:00
parent 9047eee2f1
commit 48b616629a
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -690,9 +690,7 @@ func (s *Switch) ForwardPackets(linkQuit chan struct{},
func (s *Switch) proxyFwdErrs(num *int, wg *sync.WaitGroup,
fwdChan, errChan chan error) {
defer s.wg.Done()
defer func() {
close(errChan)
}()
defer close(errChan)
// Wait here until the outer function has finished persisting
// and routing the packets. This guarantees we don't read from num until