neoneo-go/pkg/network
Roman Khimov 4d0f4d3e51 network: copy peers for Shutdown iteration
We can't lock them (or there will be a deadlock), but we need to fix this:

fatal error: concurrent map iteration and map write

goroutine 1 [running]:
runtime.throw(0xdec086, 0x26)
        /usr/lib64/go/1.12/src/runtime/panic.go:617 +0x72 fp=0xc02fec2bf8 sp=0xc02fec2bc8 pc=0x42d932
runtime.mapiternext(0xc02fec2d40)
        /usr/lib64/go/1.12/src/runtime/map.go:860 +0x597 fp=0xc02fec2c80 sp=0xc02fec2bf8 pc=0x40efe7
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown(0xc0000fc160)
        /home/rik/dev/neo-go2/pkg/network/server.go:194 +0x238 fp=0xc02fec2db0 sp=0xc02fec2c80 pc=0xa89da8
github.com/nspcc-dev/neo-go/cli/server.startServer(0xc0000fcc60, 0x0, 0x0)
        /home/rik/dev/neo-go2/cli/server/server.go:399 +0x7a9 fp=0xc02fec3820 sp=0xc02fec2db0 pc=0xae2079
...
2020-07-16 11:43:34 +03:00
..
metrics cli,pkg: use zap.Logger 2020-01-10 11:14:27 +03:00
payload network: add MPT-related P2P payloads 2020-06-03 13:33:44 +03:00
blockqueue.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
blockqueue_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
discovery.go network: fix a deadlock in DefaultDiscovery 2020-03-10 15:40:23 +03:00
discovery_test.go network: add Close() to discoverer, shut it down on exit 2020-02-28 16:22:04 +03:00
helper_test.go core: extend Blockchainer interface with StateHeight() 2020-06-22 10:53:13 +03:00
message.go network: add MPT-related P2P payloads 2020-06-03 13:33:44 +03:00
message_test.go Node improvements (#47) 2018-03-14 10:36:59 +01:00
peer.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
prometheus.go monitoring: add prometheus monitoring 2019-10-29 20:51:17 +03:00
relay_reason.go fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
server.go network: copy peers for Shutdown iteration 2020-07-16 11:43:34 +03:00
server_config.go config: move config.go out of config/ 2020-03-31 17:55:59 +03:00
server_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
tcp_peer.go *: add config flag for enabling state root feature 2020-06-24 12:37:27 +03:00
tcp_peer_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
tcp_transport.go network: add a nil check in (*TCPTransport).Close, prevent panic 2020-03-05 11:53:26 +03:00
transport.go Fixed some networking issues (#68) 2018-04-13 12:14:08 +02:00