Ver Fonte

websocket: handle unrecognized subprotocol better

Armen Babikyan há 7 anos atrás
pai
commit
91c388147a
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      src/modules/websocket/ws_frame.c

+ 3 - 0
src/modules/websocket/ws_frame.c

@@ -678,6 +678,9 @@ int ws_frame_receive(sr_event_param_t *evp)
 
 					return -1;
 				}
+			} else {
+				LM_ERR("Unrecognized WebSocket subprotocol: %u\n", frame.wsc->sub_protocol);
+				return -1;
 			}
 
 		case OPCODE_CLOSE: