Skip to content

Commit

Permalink
Update server version
Browse files Browse the repository at this point in the history
  • Loading branch information
mochi-co committed Dec 22, 2023
1 parent b2ab984 commit 5058333
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ import (
)

const (
Version = "2.4.1" // the current server version.
Version = "2.4.4" // the current server version.
defaultSysTopicInterval int64 = 1 // the interval between $SYS topic publishes
LocalListener = "local"
InlineClientId = "inline"
@@ -330,7 +330,7 @@ func (s *Server) EstablishConnection(listener string, c net.Conn) error {
func (s *Server) attachClient(cl *Client, listener string) error {
defer s.Listeners.ClientsWg.Done()
s.Listeners.ClientsWg.Add(1)

go cl.WriteLoop()
defer cl.Stop(nil)

@@ -1556,7 +1556,7 @@ func (s *Server) loadClients(v []storage.Client) {

// cancel the context, update cl.State such as disconnected time and stopCause.
cl.Stop(packets.ErrServerShuttingDown)

expire := (cl.Properties.ProtocolVersion == 5 && cl.Properties.Props.SessionExpiryInterval == 0) || (cl.Properties.ProtocolVersion < 5 && cl.Properties.Clean)
s.hooks.OnDisconnect(cl, packets.ErrServerShuttingDown, expire)
if expire {

0 comments on commit 5058333

Please sign in to comment.