Giter VIP home page Giter VIP logo

Comments (5)

nberardi avatar nberardi commented on July 30, 2024

I am unable to verify this. Do you gave a test case.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

This issue affects single server config as well. E.g., after this code:

  var t1 = new ConnectionBuilder("Server=host:123;Connection Timeout=5").Servers[0].Timeout;
  var t2 = new ConnectionBuilder("Server=host;Connection Timeout=5").Servers[0].Timeout;

t1 is 5, but t2 is 0.

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

put Connection Timeout before defining the Servers. The connection string is currently parsed in order.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

Unfortunately that doesn't help. The problem is in this code:

if (serverParts.Length == 2)
{
  int port;
  if (Int32.TryParse(serverParts[1], out port))
    Servers.Add(new Server(host: host, port: port, timeout: ConnectionTimeout.Seconds));
  else
    Servers.Add(new Server(host: host, timeout: ConnectionTimeout.Seconds));
}
else
  Servers.Add(new Server(host));

When serverParts.Length != 2 (e.g., no port specified), the final else creates a Server object without passing the timeout.

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

Ok, if you want I do accept pull requests.

from fluentcassandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.