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
Difference between unref(), quit() and end() #714
Comments
|
Then |
if you don't call quit ever what happens. |
@techsin If you never close the redis connection, your node application will sit and wait forever connected to the Redis server. |
what if application has closed down, but redis server is still up. would that make redis server hold reference? would that be kind of a memory leak sorry i wasn't clear first time |
Nope, if the application closes it will terminate the client connection and the Redis server will terminate the reference on its side, so no memory leak. |
Like the title indicates, even after reading the documentation, it's unclear to me what the difference is between
unref()
,quit()
andend()
.end()
seems to close a connection without waiting for all the sockets to be closed.unref()
seems to wait for all the commands to end.quit()
seems to be similar tounref()
.unref()
doesn't have a timeout, is it guaranteed to end or should I set a timeout ?end
event called unconditionally from which one I called ?The text was updated successfully, but these errors were encountered: