deepfryed / beanstalk-client

C/C++ beanstalk client
59 stars 44 forks source link

connection timeout #6

Closed scr34m closed 11 years ago

scr34m commented 11 years ago

Give the rights to specify connection timeout values.

deepfryed commented 11 years ago

I refactored your pull request and added an extra method for connecting with a timeout. My intention was to make the timeout explicit for the connection method instead of setting a global.

Does that seem better ? I find it more clearer.

deepfryed commented 11 years ago

https://github.com/deepfryed/beanstalk-client/compare/connect-timeout

please find the changes here

scr34m commented 11 years ago

Yes this is cleaner for everyone to use explicit connect function with timeout parameters. I've thought about this possible solution, but i was too lazy to do sorry :(

Thank you for refactoring and accepting the idea!

scr34m commented 11 years ago

I didn't explained why need this, i'm making a beanstalkd UDF plugin for MySQL and default ~10 sec timeout was a bit odd. Now i could change it to 1 sec or something lower, will try in my instance when it merged.

deepfryed commented 11 years ago

no problem, any contribution is appreciated :)

merged changes in pull/7