parent
f8098db6cc
commit
f22f209466
@ -79,8 +79,8 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @throws \Exception
|
||||
* @throws JsonException
|
||||
* @throws \Ratchet\Wamp\Exception
|
||||
* @throws \Ratchet\Wamp\JsonException
|
||||
*/
|
||||
public function onMessage(ConnectionInterface $from, $msg) {
|
||||
$from = $this->connections[$from];
|
||||
|
@ -39,9 +39,9 @@ class WampServer implements MessageComponentInterface, WsServerInterface {
|
||||
public function onMessage(ConnectionInterface $conn, $msg) {
|
||||
try {
|
||||
$this->wampProtocol->onMessage($conn, $msg);
|
||||
} catch (Exception $je) {
|
||||
} catch (Exception $we) {
|
||||
$conn->close(1007);
|
||||
} catch (\UnexpectedValueException $uve) {
|
||||
} catch (JsonException $je) {
|
||||
$conn->close(1007);
|
||||
}
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
|
||||
* @dataProvider badFormatProvider
|
||||
*/
|
||||
public function testValidJsonButInvalidProtocol($message) {
|
||||
$this->setExpectedException('\UnexpectedValueException');
|
||||
$this->setExpectedException('\Ratchet\Wamp\Exception');
|
||||
|
||||
$conn = $this->newConn();
|
||||
$this->_comp->onOpen($conn);
|
||||
|
Loading…
Reference in New Issue
Block a user