-
Notifications
You must be signed in to change notification settings - Fork 92
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
🐛 Fix async pending error #271
base: master
Are you sure you want to change the base?
Conversation
Please avoid formatting the code you are not touching. |
b1268ff
to
994a6e9
Compare
thriftpy2/contrib/aio/socket.py
Outdated
def set_handle(self, sock): | ||
self.raw_sock = sock | ||
|
||
def set_timeout(self, ms): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still can implement this method, just set the instance fields, which can be used in open and read methods.
async def open(self): | ||
addr = self.unix_socket or (self.host, self.port) | ||
try: | ||
if self.unix_socket: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use self.socket_factory instead, see https://github.com/Thriftpy/thriftpy2/pull/271/files#diff-19812d639b869b73a1158c80d996c6fa56787f93905759034caac0381ed7f8fdR82
fix #270