LaravelCollective / remote

Remote SSH Access for the Laravel Framework
MIT License
276 stars 106 forks source link

Connection timeout #16

Closed acasar closed 9 years ago

acasar commented 9 years ago

I have a deploy script that runs composer install remotely. But it seems that if takes longer than 10 seconds it gets aborted by force. Is there any way to set a longer timeout for the connection?

Thanks!

ikari7789 commented 9 years ago

Not sure if this is the best way to implement it, but this pull request will let you set a timeout.

acasar commented 9 years ago

@ikari7789 Thanks for this. I'll try it today and report back.

ikari7789 commented 9 years ago

The tests for this package are lacking to say the least, so I'm unsure how the change would affect the overall usage. There's no direct input checking that the timeout is a valid integer or not.

Sent from my iPhone

On Nov 9, 2015, at 18:08, Anže Časar notifications@github.com wrote:

@ikari7789 Thanks for this. I'll try it today and report back.

— Reply to this email directly or view it on GitHub.

acasar commented 9 years ago

I tried it and without changing anything else, I get the following error:

local.ERROR: exception 'ErrorException' with message 'Undefined index: timeout' in /var/www/project/vendor/laravelcollective/remote/src/RemoteManager.php:108

There should probably be some sort of isset check for timeout config? So that we don't break anything?

ikari7789 commented 9 years ago

I added the variable checking from your pull request, along with checking for the two other config variables, to my own pull request.