|
1 | 1 | /* |
2 | 2 | * Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. |
3 | | - * |
| 3 | + * |
4 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | | - * copy of this software and associated documentation files (the "Software"), |
6 | | - * to deal in the Software without restriction, including without limitation |
7 | | - * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
8 | | - * and/or sell copies of the Software, and to permit persons to whom the |
| 5 | + * copy of this software and associated documentation files (the "Software"), |
| 6 | + * to deal in the Software without restriction, including without limitation |
| 7 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | + * and/or sell copies of the Software, and to permit persons to whom the |
9 | 9 | * Software is furnished to do so, subject to the following conditions: |
10 | | - * |
| 10 | + * |
11 | 11 | * The above copyright notice and this permission notice shall be included in |
12 | 12 | * all copies or substantial portions of the Software. |
13 | | - * |
| 13 | + * |
14 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
15 | | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
16 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
17 | | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
18 | | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
19 | | - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 17 | + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 19 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | 20 | * DEALINGS IN THE SOFTWARE. |
21 | | - * |
| 21 | + * |
22 | 22 | */ |
23 | 23 |
|
24 | | -/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, |
25 | | -maxerr: 50, node: true */ |
26 | | -/*global */ |
27 | | - |
28 | 24 | (function () { |
29 | 25 | "use strict"; |
30 | 26 |
|
@@ -69,7 +65,7 @@ maxerr: 50, node: true */ |
69 | 65 | /** |
70 | 66 | * @private |
71 | 67 | * Sends a message over the WebSocket. Called by public sendX commands. |
72 | | - * @param {string} type Message type. Currently supported types are |
| 68 | + * @param {string} type Message type. Currently supported types are |
73 | 69 | "event", "commandResponse", "commandError", "error" |
74 | 70 | * @param {object} message Message body, must be JSON.stringify-able |
75 | 71 | */ |
@@ -132,7 +128,9 @@ maxerr: 50, node: true */ |
132 | 128 | if (this._ws) { |
133 | 129 | try { |
134 | 130 | this._ws.close(); |
135 | | - } catch (e) { } |
| 131 | + } catch (e) { |
| 132 | + // Do nothing |
| 133 | + } |
136 | 134 | } |
137 | 135 | this._connected = false; |
138 | 136 | _connections.splice(_connections.indexOf(this), 1); |
@@ -182,7 +180,7 @@ maxerr: 50, node: true */ |
182 | 180 | }; |
183 | 181 |
|
184 | 182 | /** |
185 | | - * Sends a response indicating that an error occurred during command |
| 183 | + * Sends a response indicating that an error occurred during command |
186 | 184 | * execution |
187 | 185 | * @param {number} id unique ID of the command that was executed. ID is |
188 | 186 | * generated by the client when the command is issued. |
@@ -226,7 +224,9 @@ maxerr: 50, node: true */ |
226 | 224 | for (i = 0; i < _connections.length; i++) { |
227 | 225 | try { |
228 | 226 | _connections[i].close(); |
229 | | - } catch (err) { } |
| 227 | + } catch (err) { |
| 228 | + // Do nothing |
| 229 | + } |
230 | 230 | } |
231 | 231 | _connections = []; |
232 | 232 | } |
|
0 commit comments