File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ func (p *SocketHandler) handleConnection(conn net.Conn) {
128128 // Only process heartbeat if codeTracking is enabled
129129 if p .config .CodeTracking == nil || p .config .CodeTracking .Enabled == nil || ! * p .config .CodeTracking .Enabled {
130130 slog .Debug ("Heartbeat message received but codeTracking is disabled, ignoring" )
131+ encoder := json .NewEncoder (conn )
132+ encoder .Encode (map [string ]string {"status" : "disabled" })
131133 return
132134 }
133135 buf , err := json .Marshal (msg )
@@ -140,6 +142,10 @@ func (p *SocketHandler) handleConnection(conn net.Conn) {
140142 if err := p .channel .Publish (PubSubTopic , chMsg ); err != nil {
141143 slog .Error ("Error publishing heartbeat topic" , slog .Any ("err" , err ))
142144 }
145+
146+ // Send acknowledgment to client
147+ encoder := json .NewEncoder (conn )
148+ encoder .Encode (map [string ]string {"status" : "ok" })
143149 default :
144150 slog .Error ("Unknown message type:" , slog .String ("messageType" , string (msg .Type )))
145151 }
You can’t perform that action at this time.
0 commit comments