Skip to content

Commit

Permalink
Merge pull request #134 from rstudio/file-upload-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wch authored Apr 22, 2022
2 parents f5cc995 + 4836f49 commit 44d850f
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions shiny/session/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ async def close(self, code: int = 1001) -> None:
self._run_session_end_tasks()

async def _run(self) -> None:
await self.send_custom_message(
"config", {"workerId": "", "sessionId": str(self.id), "user": None}
await self._send_message(
{"config": {"workerId": "", "sessionId": str(self.id), "user": None}}
)

try:
Expand Down Expand Up @@ -295,9 +295,7 @@ async def _dispatch(self, message: ClientMessageOther) -> None:
await self._send_response(message, value)

async def _send_response(self, message: ClientMessageOther, value: object) -> None:
await self.send_custom_message(
"response", {"tag": message["tag"], "value": value}
)
await self._send_message({"response": {"tag": message["tag"], "value": value}})

# This is called during __init__.
def _create_message_handlers(self) -> Dict[str, Callable[..., Awaitable[object]]]:
Expand Down Expand Up @@ -777,8 +775,8 @@ def set_fn(fn: render.RenderFunction) -> None:
priority=priority,
)
async def output_obs():
await self._session.send_custom_message(
"recalculating", {"name": fn_name, "status": "recalculating"}
await self._session._send_message(
{"recalculating": {"name": fn_name, "status": "recalculating"}}
)

message: Dict[str, object] = {}
Expand Down Expand Up @@ -815,8 +813,8 @@ async def output_obs():

self._session._outbound_message_queues["values"].append(message)

await self._session.send_custom_message(
"recalculating", {"name": fn_name, "status": "recalculated"}
await self._session._send_message(
{"recalculating": {"name": fn_name, "status": "recalculated"}}
)

self._effects[fn_name] = output_obs
Expand Down

0 comments on commit 44d850f

Please sign in to comment.