Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions design.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ module Protocol
def initialize(request, deadline: nil)
@request = request
@deadline = deadline
@cancelled = false
end

# @attribute [Protocol::HTTP::Request] The underlying HTTP request
Expand All @@ -562,17 +561,6 @@ module Protocol
@deadline ? [@deadline - Time.now, 0].max : nil
end

# Mark this call as cancelled
def cancel!
@cancelled = true
end

# Check if call was cancelled
# @returns [Boolean]
def cancelled?
@cancelled
end

# Get peer information (client address)
# @returns [String | Nil]
def peer
Expand Down
12 changes: 0 additions & 12 deletions lib/protocol/grpc/call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def initialize(request, response = nil, deadline: nil)
@request = request
@response = response
@deadline = deadline
@cancelled = false
end

# @attribute [Protocol::HTTP::Request] The underlying HTTP request.
Expand Down Expand Up @@ -67,17 +66,6 @@ def time_remaining
@deadline&.remaining
end

# Mark this call as cancelled.
def cancel!
@cancelled = true
end

# Check if the call was cancelled.
# @returns [Boolean] `true` if the call was cancelled, `false` otherwise
def cancelled?
@cancelled
end

# Get peer information (client address).
# @returns [String | Nil] The peer address as a string, or `Nil` if not available
def peer
Expand Down
4 changes: 4 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Releases

## Unreleased

- **Breaking**: Removed the unused `Protocol::GRPC::Call#cancel!` and `Protocol::GRPC::Call#cancelled?` methods.

## v0.13.1

- **Breaking**: Removed the deprecated `Protocol::GRPC::Methods` module. Use `Protocol::GRPC::Route`, `Protocol::GRPC::Metadata`, and `Protocol::GRPC::Header::Timeout` instead.
Expand Down
11 changes: 0 additions & 11 deletions test/protocol/grpc/call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@
end
end

it "is not cancelled by default" do
call = subject.new(request)
expect(call).not.to be(:cancelled?)
end

it "can be cancelled" do
call = subject.new(request)
call.cancel!
expect(call).to be(:cancelled?)
end

with "deadline" do
let(:deadline) {Async::Deadline.start(5.0)}

Expand Down