Phoenix Channels [警告]忽略无与伦比的主题“话题:子主题” - 如何避免终端警告消息?

时间:2018-01-12 12:43:34

标签: websocket elixir phoenix-framework elixir-framework phoenix-channels

正在运行 <com.utilities.CodesforMagnifierImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/image" /> localhost时,我们看到了这个“嘈杂”警告:

[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket

warn-ignoring-unmached-topic

code/phoenix-chat-example $ mix phx.server [info] Running ChatWeb.Endpoint with Cowboy using http://0.0.0.0:4000 09:50:37 - info: compiled 6 files into 2 files, copied 3 in 1.7 sec [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket [info] JOIN "chat_room:lobby" to ChatWeb.ChatRoomChannel Transport: Phoenix.Transports.WebSocket (2.0.0) Serializer: Phoenix.Transports.V2.WebSocketSerializer Parameters: %{} [info] Replied chat_room:lobby :ok [debug] QUERY OK source="messages" db=5.9ms decode=7.3ms SELECT m0."id", m0."message", m0."name", m0."inserted_at", m0."updated_at" FROM "messages" AS m0 [] [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket

当客户端打开时,警告会无限期地记录在终端/控制台中......

尝试搜索Google / GitHub / StackOverflow / Elixir论坛...
但没有明显的解决方案......

如果知道如何删除此警告,分享!谢谢!

其他信息

  • 操作系统:OSX 10.13.2(最新版)
  • Elixir:v1.5.3 latest
  • Phoenix:v1.3.0 current / stable
  • 终端:iTerm v3.1.5

1 个答案:

答案 0 :(得分:4)

此频道的client tries to connect

channel you do define的名称完全不同。

将这两者对应,例如:将topic:subtopic更改为chat_room:lobby