andrewrjones/grunt-ssh — pull request #8 by johngeorgewright (2013-03-25 02:37:38+00:00)
Title: Race conditions

Hey there,

I recently just tried your grunt task and it worked great for one file... however, when I configured multiple files (example below) it would sometimes miss the 1st and try and upload the 2nd twice.

```js
sftp: {
dev: {
files: {
"css/main.css": "assets/css/main.css",
"js/main.js": "assets/js/main.js"
},
options: {
path: "/methode/meth01/mnt/idx/in_out/mis/Smart_Investor",
host: "some.host.com",
username: "some-username",
password: "some-password",
srcBasePath: "assets"
}
}
}
```

```sh
$ grunt -v sftp:dev
...
Connection :: connect
copying assets/js/main.js to /methode/meth01/mnt/idx/in_out/mis/Smart_Investor/js/main.js
copying assets/js/main.js to /methode/meth01/mnt/idx/in_out/mis/Smart_Investor/js/main.js
Connection :: end
Connection :: close

Done, without errors/
```