Closed tony612 closed 4 years ago
Trailers aren't data, so whatever the issue you encounter is, this isn't the right fix. Please provide the crash logs and/or provide a test case.
The stacktrace is:(The syntax is Elixir, but similar with Erlang)
{
{:case_clause,
{:trailers,
[{"grpc-message", ""}, {"grpc-status", "0"}]
}
},
[
{:cow_http2_machine, :queue_data, 4, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowlib/src/cow_http2_machine.erl', line: 1339]},
{:cow_http2_machine, :send_or_queue_data, 4, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowlib/src/cow_http2_machine.erl', line: 1199]},
{:cowboy_http2, :maybe_send_data, 4, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowboy/src/cowboy_http2.erl', line: 770]},
{:cowboy_http2, :commands, 3, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowboy/src/cowboy_http2.erl', line: 634]},
{:cowboy_http2, :loop, 2, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowboy/src/cowboy_http2.erl', line: 247]},
{:cowboy_http, :parse, 2, [file: '/Users/tony/repo/tony612/grpc-elixir/interop/deps/cowboy/src/cowboy_http.erl', line: 311]},
{:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}
]
}
Opened an issue https://github.com/ninenines/cowlib/issues/92
Without this, a case_clause error will be raised when trailers frame is sent and there's enough window.