Closed ghost closed 6 years ago
Should not be too difficult:
TCPSocket.new(host, port, dns_timeout = nil, connect_timeout = nil)
@stefanwille i added
tcpsocket = TCPSocket.new(host, port, false, 1)
to line 16, in connection.cr. and the redis error "connection timeout" dose get raised. =]
i am very new to crystal, so please take my ideas/posts with grain of salt. i'm still learning the ropes, thank you sir. great repo.
e: btw, im on Windows 10 using WSL. if that helps
for example, if you do
the user will never get a raised error about failed to connect. in fact, the above code will block (unless u put it into a fiber)
my suggestion:
connectiontimeout
to the parameter, and after xxx seconds if no connection, it will raise an error.ty for your time