Browse code

websocket: handle unrecognized subprotocol better

Armen Babikyan authored on 26/01/2018 01:19:28
Showing 1 changed files
... ...
@@ -678,6 +678,9 @@ int ws_frame_receive(sr_event_param_t *evp)
678 678
 
679 679
 					return -1;
680 680
 				}
681
+			} else {
682
+				LM_ERR("Unrecognized WebSocket subprotocol: %u\n", frame.wsc->sub_protocol);
683
+				return -1;
681 684
 			}
682 685
 
683 686
 		case OPCODE_CLOSE: