-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sweet error message when trying to use flashsocket without root…
… privileges (thanks @wink for inspiration) Removed clients/clientsIndex and only using the index (fixes #28)
- Loading branch information
Showing
2 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,23 @@ try { | |
socket.write('</cross-domain-policy>\n'); | ||
socket.end(); | ||
}).listen(843); | ||
} catch(e){} | ||
} catch(e){ | ||
if (e.errno == 13){ | ||
console.error("\x1B[1;31m" + [ | ||
'================================================', | ||
'| WARNING! DANGER! |', | ||
'| |', | ||
'| The flash websocket transport will not work |', | ||
'| unless you run your node instance with root |', | ||
'| privileges. |', | ||
'| |', | ||
'| A flash XML policy file has to be served on |', | ||
'| port 843 (privileged) for it to work. |', | ||
'| |', | ||
'| You can run socket.io without this trasnport |', | ||
'| to make this message go (refer to README). |', | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rauchg
Author
Contributor
|
||
'| |', | ||
'===============================================|' | ||
].join("\n") + "\x1B[0m"); | ||
} | ||
} |
to make this message go away?