Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #55 from nunofgs/bugfix/add-timeout-support-for-we…
Browse files Browse the repository at this point in the history
…bsocket-connections

Add timeout support for websocket connections
  • Loading branch information
Ape authored Oct 31, 2017
2 parents 86130ea + fd1606b commit 0b42a0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions samsungctl/remote_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ def __init__(self, config):
URL_FORMAT = "ws://{}:{}/api/v2/channels/samsung.remote.control?name={}"

"""Make a new connection."""
self.connection = websocket.WebSocket()
self.connection.connect(URL_FORMAT.format(config["host"], config["port"],
self._serialize_string(config["name"])))
self.connection = websocket.create_connection(URL_FORMAT.format(config["host"], config["port"],
self._serialize_string(config["name"])), config["timeout"])

self._read_response()

Expand Down

0 comments on commit 0b42a0b

Please sign in to comment.