Skip to content

Commit

Permalink
Integrated Thiago's PR 120 comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
treuille committed Nov 25, 2018
1 parent b59be28 commit 5fc5918
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/streamlit/proxy/BrowserWebSocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def do_loop(self):
try:
while self._is_open:
self._connection, self._queue = (
yield self._proxy.replace_connection_and_queue(
yield self._proxy.get_latest_connection_and_queue(
self._report_name, self,
self._connection, self._queue))
if not self._queue.is_closed():
Expand Down
6 changes: 3 additions & 3 deletions lib/streamlit/proxy/Proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ def on_browser_connection_closed(self, connection, queue): # noqa: D401
self._deregister_browser(connection, queue)

@gen.coroutine
def replace_connection_and_queue( # noqa: D401
def get_latest_connection_and_queue( # noqa: D401
self, report_name, ws, connection, queue):
"""Gets the most recent proxy connection and queue for this report_name.
"""Get the most recent proxy connection and queue for this report_name.
BrowserWebSocket continuously calls this method in case a new client
connection was established, in which case the BrowserWebSocket should
Expand Down Expand Up @@ -318,7 +318,7 @@ def replace_connection_and_queue( # noqa: D401
raise gen.Return((connection, queue))

LOGGER.debug('The proxy connection for "%s" is not registered.',
report_name)
report_name)

self._deregister_browser(connection, queue)
new_connection, new_queue = (
Expand Down

0 comments on commit 5fc5918

Please sign in to comment.