Closed knuesel closed 3 years ago
Yes, I've been seeing this too. I think I might have to wrap the socket in a class that also contains the 'name' as it was when the connection was first made. I don't have a lot of time to fix it right now, since I have other priorities, and this isn't a big issue since it is only when the node is being shutdown, but it would be nice to have a more clean shutdown. Let me know if you want to take a look into implementing a fix, and if not I'll try to get to it eventually.
OK, I'll propose a fix.
Letting
dartros_example.dart
run for a few seconds, then pressing Ctrl-C gives the following:The problem appears to be that
publisher_impl.dart
can dosubClients.remove(connection.name)
when the socket is already closed. This throws when thename
extension method callsremoteAddress
on the socket.