-
Notifications
You must be signed in to change notification settings - Fork 118
Conversation
python/srv
Outdated
else: | ||
print('Starting TCP server.') | ||
loop.run_until_complete(veles.asrv.proto.tcp_server(srv, host, int(port))) | ||
loop.run_until_complete(tcp_server(conn, host, int(port))) | ||
print('Ready.') | ||
# loop.add_signal_handler(signal.SIGINT, loop.stop) |
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.
Not related to this PR, but why is this commented out? Please write a comment with reason or delete.
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.
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 don't see any near future where this can be restored - the problem is that add_signal_handler
isn't available on Windows so we can't use it :(
So lets remove it.
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.
try: ... except AttributeError: pass?
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.
Done
python/veles/server/proto.py
Outdated
@asyncio.coroutine | ||
def unix_server(srv, path): | ||
return (yield from srv.loop.create_unix_server(lambda: Proto(srv), path)) | ||
async def unix_server(conn, path): |
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.
nit: rename to create_unix_server
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.
Done
python/veles/server/proto.py
Outdated
@asyncio.coroutine | ||
def tcp_server(srv, ip, port): | ||
return (yield from srv.loop.create_server(lambda: Proto(srv), ip, port)) | ||
async def tcp_server(conn, ip, port): |
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.
nit: rename to create_tcp_server
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.
Done
1176ccf
to
1e1154a
Compare
1e1154a
to
9491461
Compare
This is fix for regression introduced in PR #87 where wrong exception type was assumed to be thrown by add_signal_handler on Windows
This is fix for regression introduced in PR #87 where wrong exception type was assumed to be thrown by add_signal_handler on Windows
No description provided.