Skip to content

Commit

Permalink
Added yield for server streaming, fixes danielgtaylor#412
Browse files Browse the repository at this point in the history
Signed-off-by: Antonín Říha <[email protected]>
  • Loading branch information
anriha committed Aug 29, 2022
1 parent 591ec5e commit 2365ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/betterproto/templates/template.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ class {{ service.py_name }}Base(ServiceBase):

{% endif %}
raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
{% if method.server_streaming %}
yield {{ method.py_output_message_type }}()
{% endif %}

{% endfor %}

Expand Down

0 comments on commit 2365ef8

Please sign in to comment.