File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ func (h *Hooks) OnUnsubscribed(cl *Client, pk packets.Packet) {
351
351
}
352
352
}
353
353
354
- // OnPublish is called when a client publishes a message. This method differs from OnMessage
354
+ // OnPublish is called when a client publishes a message. This method differs from OnPublished
355
355
// in that it allows you to modify you to modify the incoming packet before it is processed.
356
356
// The return values of the hook methods are passed-through in the order the hooks were attached.
357
357
func (h * Hooks ) OnPublish (cl * Client , pk packets.Packet ) (pkx packets.Packet , err error ) {
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ import (
26
26
)
27
27
28
28
const (
29
- Version = "2.0.0" // the current server version.
30
- defaultSysTopicInterval int64 = 1 // the interval between $SYS topic publishes
31
- defaultFanPoolSize uint64 = 64 // the number of concurrent workers in the pool
32
- defaultFanPoolQueueSize uint64 = 32 * 128 // the capacity of each worker queue
29
+ Version = "2.0.5" // the current server version.
30
+ defaultSysTopicInterval int64 = 1 // the interval between $SYS topic publishes
31
+ defaultFanPoolSize uint64 = 32 // the number of concurrent workers in the pool
32
+ defaultFanPoolQueueSize uint64 = 1024 // the capacity of each worker queue
33
33
)
34
34
35
35
var (
@@ -697,6 +697,7 @@ func (s *Server) processPublish(cl *Client, pk packets.Packet) error {
697
697
s .publishToSubscribers (pk )
698
698
})
699
699
700
+ s .hooks .OnPublished (cl , pk )
700
701
return nil
701
702
}
702
703
@@ -727,8 +728,7 @@ func (s *Server) processPublish(cl *Client, pk packets.Packet) error {
727
728
s .publishToSubscribers (pk )
728
729
})
729
730
730
- s .hooks .OnPublish (cl , pk )
731
-
731
+ s .hooks .OnPublished (cl , pk )
732
732
return nil
733
733
}
734
734
You can’t perform that action at this time.
0 commit comments