go-perun icon indicating copy to clipboard operation
go-perun copied to clipboard

SubscribeClient should not panic

Open ggwpez opened this issue 3 years ago • 0 comments

Location

[wire] Localbus.SubscribeClient the close(recv.exists) statement.

Problem

Code panics when it is called twice with the same address.
AFAIK the local bus was only intended for testing and not production usage, so some edge-cases which are not needed for testing were omitted.

Proposal

Return an error instead and add a test+race test.

ggwpez avatar Sep 23 '21 09:09 ggwpez