1

我能够成功启动并运行 GWT Atmosphere 演示项目以及 Grails 氛围项目。但是,当使用 Grails 后端启动 GWT Atmosphere 客户端时,它会停止工作并显示以下消息:

comet.beforeDisconnected
comet.disconnected
comet.error [connected=false] (0)0
comet.error [connected=true] (-1)Invalid message received: <!--   ---------------------------------------------------------------- http://github.com/Atmosphere ------------------------------------------------------------------------ -->
comet.beforeDisconnected
comet.error [connected=true] (-1)Expecting disconnection but received message: <!-- Welcome to the Atmosphere Framework. To work with all the browsers when suspending connection, Atmosphere must output some data to makes WebKit based browser working.-->

有什么建议吗?

4

2 回答 2

1

你有更多可用的输出吗?也许是个例外?

广播消息时会发生这种情况吗?也许您已将暂停的连接配置为在广播时恢复。

也许问题是收到的消息。您可以尝试在挂起时停用写入消息,例如:

新的 SuspendResponse.SuspendResponseBuilderString... .outputComments(false) ... .build()

于 2011-09-01T08:40:33.737 回答
1

一切都是为了正确配置 CometHandler。它仍然没有像我们预期的那样工作,但它至少与手动注入 AtmosphereServlet 的工作方式相同

于 2012-01-13T13:10:31.377 回答