Skip to content

fix hang on Win if server is not alive or died#37

Open
pfpulux wants to merge 1 commit into
nim-lang:masterfrom
pfpulux:tsend4win
Open

fix hang on Win if server is not alive or died#37
pfpulux wants to merge 1 commit into
nim-lang:masterfrom
pfpulux:tsend4win

Conversation

@pfpulux

@pfpulux pfpulux commented Mar 27, 2024

Copy link
Copy Markdown

A client on win hang for a long time if the server is not alive. This PR use trySend on Win to fix this. Also replace TaintedStringwith string and add small adjustment suggest by nimsuggest.

Comment thread src/redis.nim Outdated
when r is Redis:
r.socket.send(data)
when defined(windows):
if not r.socket.tryRecv(data):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would tryRecv + close be equivalent to send?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for that, should be trySend(, see the update below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants