Skip to content

Commit

Permalink
修复保存历史记录异常
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeFJ committed Sep 28, 2023
1 parent f707935 commit 3c6987b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class HistroySessionListener implements SessionListener {

@Override
public void onConnect(TcpSession tcpSession) {
tcpSession.setHistroyRecordFIFO(new FIFO<>(maxHistroy));

HistroyRecord histroyRecord = new HistroyRecord();
histroyRecord.setDataType(0);
histroyRecord.setTime(DateTimeUtils2.outNow());
Expand Down Expand Up @@ -60,7 +62,7 @@ public void onDisConnect(TcpSession tcpSession, String reason) {

@Override
public void online(TcpSession tcpSession) {
tcpSession.setHistroyRecordFIFO(new FIFO<>(maxHistroy));

}

@Override
Expand Down

0 comments on commit 3c6987b

Please sign in to comment.