| 1425 | } |
| 1426 | |
| 1427 | func (as *addrConnStream) CloseSend() error { |
| 1428 | if as.sentLast { |
| 1429 | // Return a nil error on repeated calls to this method. |
| 1430 | return nil |
| 1431 | } |
| 1432 | as.sentLast = true |
| 1433 | |
| 1434 | as.transportStream.Write(nil, nil, &transport.WriteOptions{Last: true}) |
| 1435 | // Always return nil; io.EOF is the only error that might make sense |
| 1436 | // instead, but there is no need to signal the client to call RecvMsg |
| 1437 | // as the only use left for the stream after CloseSend is to call |
| 1438 | // RecvMsg. This also matches historical behavior. |
| 1439 | return nil |
| 1440 | } |
| 1441 | |
| 1442 | func (as *addrConnStream) Context() context.Context { |
| 1443 | return as.transportStream.Context() |