Skip to content

Commit

Permalink
fix(impl): don't error when channel missing (#107)
Browse files Browse the repository at this point in the history
When close is called, if the node has restarted, likely there is no open
channel. Therefore, we should not error, and, instead, just log a
warning
  • Loading branch information
hannahhoward authored Oct 27, 2020
1 parent 1803eac commit 7f08cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func (m *manager) CloseDataTransferChannel(ctx context.Context, chid datatransfe
}
err = m.transport.CloseChannel(ctx, chid)
if err != nil {
return err
log.Warnf("unable to close channel: %w", err)
}

if err := m.dataTransferNetwork.SendMessage(ctx, chst.OtherPeer(), m.cancelMessage(chid)); err != nil {
Expand Down

0 comments on commit 7f08cb3

Please sign in to comment.