Closing connection doesn't stop execution
Closing a connection using  something like the example below doesn't stop the execution of the code. 
Right now we're putting everything in if and else statements and stopping further execution like that. 
Is there a better way or proper way to do this?

Function to kill connection:
```php
public function forceClose(ConnectionInterface $conn, $reason) {
        // Close connection to client, violated security
        $conn->close();
        $this->clients->detach($conn);
        echo "PeerId: {$this->peerID}'s connection has been terminated for security reasons\n";
        echo "Reason: {$reason}\n";
    }
```

Example of calling said function:
```php
$this->forceClose($conn, 'onMessage parameter check failed');
```