Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

double port error on connect fail with custom port #1

Closed
circulon opened this issue Aug 16, 2012 · 0 comments
Closed

double port error on connect fail with custom port #1

circulon opened this issue Aug 16, 2012 · 0 comments
Labels

Comments

@circulon
Copy link
Contributor

Hi

Nice Interface, Makes my development sooo much simpler.

Ok this is a minor aesthetic issue but confusing to the beanstalk noob

if you type an invalid ip with a custom port in the server box you will get an error stating a socket connect failure to the
ip followed by the custom port followed by :11300.

eg
Socket error 60: Operation timed out (connecting to 192.168.42.10:23267:11300)

This seems to be due to the Job controller passing the server and port as a single string.

I fixed it by changing the connection setup of the getListAction() in the job controller to

    $server = $this->_getParam("server");
    $exp=explode(":", $server);
    $server = (isset($exp[0]))?$exp[0]:"localhost";
    $port =  (isset($exp[1]))?$exp[1]:"11300";
    $data = array ();
    try {
        // Connect to the server and get job list
        $messageQueue = new Pheanstalk_Pheanstalk($server,$port);

You may have a better method but this works for me

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants