Pregunta

I attempt to connect to my Redis Serverinstance through ConnectionMultiplexer.Connect("127.0.0.1"); but despite no server being up and running the connect does not throw an error nor raise any ConnectionFailed event. I double checked I do not have any stand-alone instance nor Windows Service of Redis running.

How can I check whether a connect was successful or not? I run on .Net 4.5 and use StackExchange.Redis version 4.0.30319

Thanks

¿Fue útil?

Solución

That should probably be logged as a bug on SE.Redis rather than as a question here. It is not meant to do that unless you have have explicitly set AbortOnConnectFail to false (it defaults to true).

As for how to detect it if a glitch exists:

  • try a Ping()
  • use the IsConnected property on IServer
  • use the IsConnected(RedisKey) method on IDatabase (if you aren't using a cluster, you can pass default(RedisKey) to that method; on a cluster it is necessary to know which server you are talking about)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top