Commit a5ca9158 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Warn if sending message to down network.

parent 6a712651
......@@ -534,8 +534,11 @@ ensure_space(struct network *net, int space)
static void
start_message(struct network *net, int type, int len)
{
if(!net->up)
if(!net->up) {
fprintf(stderr,
"Warning: attempting to send message to down network.\n");
return;
}
if(net->bufsize - net->buffered < len + 2)
flushbuf(net);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment