Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Dec 11, 2024
1 parent f313f5f commit c4cdfd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/usage/websockets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,4 @@ send data in any format, independently of the mode. The mode only affects how th
bytes are handled during transport (i.e. on the protocol level). In most cases the
default mode - ``text`` - is all that's needed. Binary transport is usually employed
when sending binary blobs that don't have a meaningful string representation, such
as images.
as images.
4 changes: 1 addition & 3 deletions litestar/handlers/websocket_handlers/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ def on_registration(self, app: Litestar) -> None:
return_dto = self.resolve_return_dto()

# make sure the closure doesn't capture self._ws_stream / self
send_mode = cast( # pyright doesn't track the 'Literal' here for some reason
"WebSocketMode", self._ws_stream_options.send_mode
)
send_mode = self._ws_stream_options.send_mode
listen_for_disconnect = self._ws_stream_options.listen_for_disconnect
warn_on_data_discard = self._ws_stream_options.warn_on_data_discard

Expand Down

0 comments on commit c4cdfd4

Please sign in to comment.