Skip to content

Commit

Permalink
code change
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyang1994 committed Aug 8, 2024
1 parent 2ccd8eb commit cefc34e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions acceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,14 @@ func (a *Acceptor) handleConnection(netConn net.Conn) {
a.globalLog.OnEventf("Session %v not found for incoming message: %s", sessID, msgBytes)
return
}
a.sessions[sessID], err = a.sessionFactory.createSession(sessID, a.storeFactory, a.settings.globalSettings.clone(), a.logFactory, a.app)
dynamicSession, err := a.sessionFactory.createSession(sessID, a.storeFactory, a.settings.globalSettings.clone(), a.logFactory, a.app)
if err != nil {
a.globalLog.OnEventf("Dynamic session %v failed to create: %v", sessID, err)
return
}
a.dynamicSessionChan <- a.sessions[sessID]
session = a.sessions[sessID]
a.sessions[sessID] = dynamicSession
a.dynamicSessionChan <- dynamicSession
session = dynamicSession
}

a.sessionAddr.Store(sessID, netConn.RemoteAddr())
Expand Down

0 comments on commit cefc34e

Please sign in to comment.