Skip to content
Snippets Groups Projects
Commit aac638de authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added a few set_nonblocking(0,0,0) of paranoia reasons.

Rev: lib/modules/Protocols.pmod/Line.pmod:1.7
parent 0ae73aaf
No related branches found
No related tags found
No related merge requests found
/* /*
* $Id: Line.pmod,v 1.6 1998/10/16 00:08:11 nisse Exp $ * $Id: Line.pmod,v 1.7 1998/10/16 15:34:58 grubba Exp $
* *
* Line-buffered protocol handling. * Line-buffered protocol handling.
* *
...@@ -25,6 +25,9 @@ class simple ...@@ -25,6 +25,9 @@ class simple
static void do_timeout() static void do_timeout()
{ {
if (con) { if (con) {
catch {
con->set_nonblocking(0,0,0); // Make sure all callbacks are cleared.
};
catch { catch {
con->close(); con->close();
}; };
...@@ -167,6 +170,7 @@ class simple ...@@ -167,6 +170,7 @@ class simple
if (handle_data || sizeof(read_buffer) || sizeof(multi_line_buffer)) { if (handle_data || sizeof(read_buffer) || sizeof(multi_line_buffer)) {
werror("close_callback(): Unexpected close!\n"); werror("close_callback(): Unexpected close!\n");
} }
con->set_nonblocking(0,0,0); // Make sure all callbacks are cleared.
con->close(); con->close();
con = 0; con = 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment