Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed send_data method for WebSocket #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions py5paisa/py5paisa.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,12 @@ def on_open(ws):
except Exception as e:
log_response(e)

def send_data(self, open_: any):
def send_data(self, wspayload: dict):
try:
self.ws.on_open = open_
if self.ws is not None:
self.ws.send(json.dumps(wspayload))
else:
log_response("Websocket Connection not established call connect method first")
except Exception as e:
log_response(e)

Expand Down