neo-go/cli
Alexey Savchuk df9247c00b services/rpcsrv: Return a new server by pointer
Before, a new server was returned by value which could cause
a panic `unlock of unlocked mutex` on SIGHUP handling. It's
because the new server overwrites a locked mutex of the already
existing server.

oct‚ 22 13:51:15 node1 neo-go[1183338]: fatal error: sync: Unlock of unlocked RWMutex
oct‚ 22 13:51:15 node1 neo-go[1183338]: goroutine 538 [running]:
oct‚ 22 13:51:15 node1 neo-go[1183338]: sync.fatal({0xf83d64?, 0xc001085880?})
oct‚ 22 13:51:15 node1 neo-go[1183338]:         runtime/panic.go:1007 +0x18
oct‚ 22 13:51:15 node1 neo-go[1183338]: sync.(*RWMutex).Unlock(0xc00019a4c8)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         sync/rwmutex.go:208 +0x45
oct‚ 22 13:51:15 node1 neo-go[1183338]: github.com/nspcc-dev/neo-go/pkg/services/rpcsrv.(*Server).dropSubscriber(0xc00019a2c8, 0xc000a77740)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         github.com/nspcc-dev/neo-go/pkg/services/rpcsrv/server.go:825 +0xce
oct‚ 22 13:51:15 node1 neo-go[1183338]: github.com/nspcc-dev/neo-go/pkg/services/rpcsrv.(*Server).handleWsReads(0xc00019a2c8, 0xc0034478c0, 0xc000af5f80, 0xc000a7
7740)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         github.com/nspcc-dev/neo-go/pkg/services/rpcsrv/server.go:810 +0x266
oct‚ 22 13:51:15 node1 neo-go[1183338]: github.com/nspcc-dev/neo-go/pkg/services/rpcsrv.(*Server).handleHTTPRequest(0xc00019a2c8, {0x11c3900, 0xc003437dc0}, 0xc00
31945a0)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         github.com/nspcc-dev/neo-go/pkg/services/rpcsrv/server.go:582 +0x54a
oct‚ 22 13:51:15 node1 neo-go[1183338]: net/http.HandlerFunc.ServeHTTP(0x471779?, {0x11c3900?, 0xc003437dc0?}, 0xc000943b68?)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         net/http/server.go:2171 +0x29
oct‚ 22 13:51:15 node1 neo-go[1183338]: net/http.serverHandler.ServeHTTP({0xc000a77680?}, {0x11c3900?, 0xc003437dc0?}, 0x6?)
oct‚ 22 13:51:15 node1 neo-go[1183338]:         net/http/server.go:3142 +0x8e
oct‚ 22 13:51:15 node1 neo-go[1183338]: net/http.(*conn).serve(0xc0032030e0, {0x11c5220, 0xc000a76960})
oct‚ 22 13:51:15 node1 neo-go[1183338]:         net/http/server.go:2044 +0x5e8
oct‚ 22 13:51:15 node1 neo-go[1183338]: created by net/http.(*Server).Serve in goroutine 534
oct‚ 22 13:51:15 node1 neo-go[1183338]:         net/http/server.go:3290 +0x4b4

Signed-off-by: Alexey Savchuk <alexey.a.savchuk@yandex.com>
2024-11-05 15:05:25 +03:00
..
app cli: upgrade urfave lib to v2 2024-07-12 11:58:12 +03:00
cmdargs *: fix linter exhaustive errors 2024-09-26 13:29:03 +03:00
flags cli: upgrade urfave lib to v2 2024-07-12 11:58:12 +03:00
input *: bump minimum supported go version 2022-08-08 13:59:32 +03:00
nep_test cli: make nep1X balance commands work without a wallet, fix #3275 2024-11-05 13:12:13 +03:00
options cli: add Required field for flags 2024-07-12 11:58:12 +03:00
paramcontext context: define a constant for transaction context type 2022-09-08 14:33:04 +03:00
query *: use cmp.Or where appropriate 2024-08-30 17:00:11 +03:00
server services/rpcsrv: Return a new server by pointer 2024-11-05 15:05:25 +03:00
smartcontract rpcbinding: handle NULL results for structures, fix #3581 2024-09-11 18:54:16 +03:00
testdata wallet: do not store deployed contract script inside Contract account 2024-06-05 15:27:20 +03:00
txctx cli: upgrade urfave lib to v2 2024-07-12 11:58:12 +03:00
util cli: use GET instead of HEAD in upload bin 2024-11-02 12:04:02 +03:00
vm go.mod: update to Go 1.22+ 2024-08-30 17:00:11 +03:00
wallet cli: make nep1X balance commands work without a wallet, fix #3275 2024-11-05 13:12:13 +03:00
.gitignore Better error messages (#24) 2018-02-24 10:10:45 +01:00
main.go cli: don't panic when handling error 2024-07-12 11:58:12 +03:00