-
Notifications
You must be signed in to change notification settings - Fork 13
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
is it possible adding a mysql_option timeout ? #13
Comments
That sounds like a good enhancement and we would definitely welcome a PR to improve this. |
Sorry for my latency, I thought I would receive a notification by mail... I forked the repository and modify the file, pushed to the new fork. Tell me if you want me to try a pull request... I don't exactly know the procedure and how to tag version... (it has changed from 0.13.2 to 1.0.0 ?) |
Yes, PR is Pull Request. I took a look at your fork commit at TheSnowFox@da372d5 it looks ready for review. You should be able to open the PR by going to https://github.com/TheSnowFox/SwiftKueryMySQL and clicking the "New Pull Request" button. |
Thank you :) |
Hi,
First of all, thank you very much for this module and SwiftKuery, you've done an great job.
I'm using your modules for my current project and it works great except for one thing:
At the first connection, if mysql server is down or if settings are wrong (host address, password, etc.) in:
MySQLThreadSafeConnection.createPool(host: , user: , password: , database: , port: , unixSocket: , clientFlag: , characterSet:, reconnect:, poolOptions: )
,the execution is blocked at:
if mysql_real_connect(mysql, host, user, password, database, port, unixSocket, clientFlag) != nil
in connect() (line 166 in MySQLConnection.swift)The program doesn't crash but seems waiting.
I can be wrong but by reading the source files, it seems that
mysql_options(MYSQL_OPT_CONNECT_TIMEOUT)
was never set.Is it possible to add a way to set this property or using timeout argument in
ConnectionPoolOption(initialCapacity:, maxCapacity:, timeout:)
?Thank you in advance
The text was updated successfully, but these errors were encountered: