diff --git a/docs b/docs index cbd913fb..7414ae3e 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit cbd913fba2249a0055bb732452a67f911119c40a +Subproject commit 7414ae3e537b26a15b75d2a00ef6f93e702d2cd8 diff --git a/src/danog/MadelineProto/DataCenter.php b/src/danog/MadelineProto/DataCenter.php index c6dc9369..902a0639 100644 --- a/src/danog/MadelineProto/DataCenter.php +++ b/src/danog/MadelineProto/DataCenter.php @@ -444,18 +444,10 @@ class DataCenter } break; case 'wss': - if ($this->settings[$dc_config_number]['obfuscated']) { - $default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; - } else { - $default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], end($default)]; - } + $default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; break; case 'ws': - if ($this->settings[$dc_config_number]['obfuscated']) { - $default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; - } else { - $default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], end($default)]; - } + $default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; break; } } diff --git a/src/danog/MadelineProto/Stream/Transport/WsStream.php b/src/danog/MadelineProto/Stream/Transport/WsStream.php index 6d70f5c1..6e01385e 100644 --- a/src/danog/MadelineProto/Stream/Transport/WsStream.php +++ b/src/danog/MadelineProto/Stream/Transport/WsStream.php @@ -84,6 +84,7 @@ class WsStream implements RawStreamInterface break; } } + if (!$this->stream) { throw new ConnectionException('Failed to read response from server'); }