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

Bidirection stream client block #7971

Open
fayfive opened this issue Dec 26, 2024 · 1 comment
Open

Bidirection stream client block #7971

fayfive opened this issue Dec 26, 2024 · 1 comment

Comments

@fayfive
Copy link

fayfive commented Dec 26, 2024

I use GRPC bidirection stream to do long connection. I have discovered an problem.
When I send data to the non fully GRPC functional server,the client will be blocked. It's different to describe. Here is my code.

// here is the client
func (client *ClientAdmin) UploadPicture(pic *pb.UploadPictureReq) (err error) {
        // will be blocked here
        return client.stream.Send(&pb.ManageReq{
	        Option: pb.MANAGE_OPT_MANAGE_OPT_UPLOAD_PICTURE,
	        Param: &pb.ManageReq_Picture{
                        // pic contain []byte about 150KB, if make the pic nil, pic.src=nil,it will not be block
		        Picture: pic,
	        },
        })
	return errors.New("stream is not here")
}

GRPC server do not implement UploadPicture. but implement the other function Why I will be block here?

@arjan-bal arjan-bal self-assigned this Dec 26, 2024
@arjan-bal
Copy link
Contributor

arjan-bal commented Dec 26, 2024

HI @fayfive, the provided code isn't sufficient to understand and debug the problem. Can you please provide a minimal reproducible example?

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

No branches or pull requests

2 participants