client: object PUT stream handler misses unexpected OK response #245

Open
opened 2025-12-28 18:07:33 +00:00 by sami · 0 comments
Owner

Originally created by @cthulhu-rider on GitHub (Dec 5, 2024).

objects are put via gRPC client stream. Normally the server should respond with OK only after the stream is finished by the client (via Close)

Current Behavior

Write misses the unexpected OK response, and if user calls Write again, he receives following error:

rpc error: code = Internal desc = SendMsg called after CloseSend

This is a gRPC error when trying to send a message to a closed stream (what shouldn't happen)

Expected Behavior

when stream finish encountered, and the code is OK, return

server unexpectedly interrupted the stream with status OK

Possible Solution

nspcc-dev/neofs-sdk-go@335d9fe90f/client/object_put.go (L204)
x.err will be nil here. If so, return a stream violation error

Context

Client testing

Regression

No

Your Environment

Originally created by @cthulhu-rider on GitHub (Dec 5, 2024). objects are put via gRPC client stream. Normally the server should respond with OK only after the stream is finished by the client (via [Close](https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/client#DefaultObjectWriter.Close)) ## Current Behavior [`Write`](https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/client#DefaultObjectWriter.Write) misses the unexpected OK response, and if user calls `Write` again, he receives following error: ``` rpc error: code = Internal desc = SendMsg called after CloseSend ``` This is a gRPC error when trying to send a message to a closed stream (what shouldn't happen) ## Expected Behavior when stream finish encountered, and the code is OK, return ``` server unexpectedly interrupted the stream with status OK ``` ## Possible Solution https://github.com/nspcc-dev/neofs-sdk-go/blob/335d9fe90f24494944c2888ef385f06f5f81dcfc/client/object_put.go#L204 `x.err` will be nil here. If so, return a stream violation error ## Context `Client` testing ## Regression No ## Your Environment * Version of the product used: [`335d9fe90f24494944c2888ef385f06f5f81dcfc`](https://github.com/nspcc-dev/neofs-sdk-go/tree/335d9fe90f24494944c2888ef385f06f5f81dcfc)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-sdk-go#245
No description provided.