mirror of
https://github.com/payden/libwsclient
synced 2024-10-27 17:54:01 +00:00
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.
This commit is contained in:
parent
b28c123b01
commit
fda4e30b01
@ -104,6 +104,9 @@ void libwsclient_handle_control_frame(wsclient *c, libwsclient_frame *ctl_frame)
|
|||||||
c->flags |= CLIENT_SHOULD_CLOSE;
|
c->flags |= CLIENT_SHOULD_CLOSE;
|
||||||
pthread_mutex_unlock(&c->lock);
|
pthread_mutex_unlock(&c->lock);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "Unhandled control frame received. Opcode: %d\n", ctl_frame->opcode);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
libwsclient_frame *ptr = NULL;
|
libwsclient_frame *ptr = NULL;
|
||||||
ptr = ctl_frame->prev_frame; //This very well may be a NULL pointer, but just in case we preserve it.
|
ptr = ctl_frame->prev_frame; //This very well may be a NULL pointer, but just in case we preserve it.
|
||||||
|
Loading…
Reference in New Issue
Block a user