websocket建立双向聊天在关闭时调用service中的方法报错,求解?@OnClose
public void onClose(@PathParam("fangJianId") String fangJianId,
@PathParam("uname") String uname) throws IOException {
if (!fqqServiseImpl.deleteFangjian(fangJianId, uname)) {
this.session.getBasicRemote().sendText("关闭异常");
}
userSocket.get(fangJianId).remove(this);
if (userSocket.get(fangJianId).size() == 0) {
userSocket.remove(fangJianId);
}
System.out.println(uname + "退出房间!!");
}
添加回答
举报
0/150
提交
取消