Add notification of unhandled control frames

Send a message to stderr.  I have an inkling one
of my programs is timing out because it's not responding
to server PINGs.  This might tell me that.  Useful anyway.
master
Payden Sutherland 12 years ago
parent b28c123b01
commit fda4e30b01

@ -104,6 +104,9 @@ void libwsclient_handle_control_frame(wsclient *c, libwsclient_frame *ctl_frame)
c->flags |= CLIENT_SHOULD_CLOSE;
pthread_mutex_unlock(&c->lock);
break;
default:
fprintf(stderr, "Unhandled control frame received. Opcode: %d\n", ctl_frame->opcode);
break;
}
libwsclient_frame *ptr = NULL;
ptr = ctl_frame->prev_frame; //This very well may be a NULL pointer, but just in case we preserve it.

Loading…
Cancel
Save