-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Error when trying to pool socks stream connections #80
Comments
Works fine for me, both pool and non-pool connection Which version are you using? Can you try master? |
I'm using version 0.11.3. |
actually, I tried npm version, not master ( did
|
I am experiencing same issue. It works with simple code as above, however when I try to do same thing in a REST API endpoint I get same error (it happens for
Its a simple web server that on endpoint
If you try to I have no idea why this is happening but maybe there is some conflict between restify & mysql2? I am using: proxy & db urls are fake so you will need your own for testing... |
It looks like pool is not aware of |
|
the problem is that new mysql connection needs new stream. I think I'll add check "If stream is a function, intrerpret it as 'async stream factory' " and you'll use it like this: mysql_options =
database: dbUrl.path.substr(1)
user: dbUrl.auth.split(':')[0]
password: dbUrl.auth.split(':')[1]
stream: function(cb) {
cb(null, new SocksConnection(mysql_server_options, socks_options));
} |
Sounds good :) 2014-11-14 1:40 GMT+01:00 Andrey Sidorov notifications@github.com:
|
Any update on this? |
Hi! I looked it initially and was afraid that it's to big change to allow connection to be created asynchronously, but now I think that it can be sync function similar to so your code is going to be mysql_options =
database: dbUrl.path.substr(1)
user: dbUrl.auth.split(':')[0]
password: dbUrl.auth.split(':')[1]
stream: function() {
return new SocksConnection(mysql_server_options, socks_options);
} I'll try to add this today |
I'm trying to pool socks stream connections.
Sample code here:
But I'm getting this error log:
Is my code is incorrect? More generally, are pooled custom stream connections normally supported? or is it specific to socks stream (my case)?
Thanks for your help.
The text was updated successfully, but these errors were encountered: