Skip to content
Snippets Groups Projects
Commit 33f1ec0d authored by echicken's avatar echicken :chicken:
Browse files

Timeout on any recv; print msg on connect/banner failure.

parent 5d5c2ee4
Branches
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ function main() {
w = true;
while (!js.terminated && sock.is_connected && sock.data_waiting) {
w = false;
console.write(sock.recv());
console.write(sock.recv(512, timeout));
}
while (!js.terminated && sock.is_connected && console.input_buffer_level > 0) {
w = false;
......@@ -136,5 +136,9 @@ function main() {
}
init();
if (!connect()) exit();
if (!connect()) {
console.putmsg('Service unavailable, please try again later.');
console.pause();
exit();
}
main();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment