Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] run into panic when service push data with custom request header. #738

Closed
brotherlu-xcq opened this issue Mar 29, 2024 · 1 comment

Comments

@brotherlu-xcq
Copy link
Contributor

What version of nacos-sdk-go are you using?

master branch.

What version of nacos-sever are you using?

custom server.

What version of Go are you using (go version)?

1.18

What operating system (Linux, Windows, …) and version?

windows

What did you do?

If possible, provide a recipe for reproducing the error.
server put a field in request header to client.

panic: assignment to entry in nil map

goroutine 52 [running]:
github.com/nacos-group/nacos-sdk-go/v2/common/remote/rpc/rpc_request.(*Request).PutAllHeaders(0xc000324978, 0xc00037ea20)
	D:/opensource/nacos-sdk-go/common/remote/rpc/rpc_request/rpc_request.go:43 +0xd4
github.com/nacos-group/nacos-sdk-go/v2/common/remote/rpc.(*GrpcClient).handleServerRequest(0xc0001887e0, 0xc000278c30, 0xc000315140)
	D:/opensource/nacos-sdk-go/common/remote/rpc/grpc_client.go:258 +0x477
github.com/nacos-group/nacos-sdk-go/v2/common/remote/rpc.(*GrpcClient).bindBiRequestStream.func1()
	D:/opensource/nacos-sdk-go/common/remote/rpc/grpc_client.go:204 +0x6ad
created by github.com/nacos-group/nacos-sdk-go/v2/common/remote/rpc.(*GrpcClient).bindBiRequestStream
	D:/opensource/nacos-sdk-go/common/remote/rpc/grpc_client.go:179 +0xd4

What did you expect to see?

work normally

What did you see instead?

panic.

@brotherlu-xcq
Copy link
Contributor Author

fix by PR #739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant