Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not kill the connection on error #133

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions datastreamer/streamserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const (
maxConnections = 100 // Maximum number of connected clients
streamBuffer = 256 // Buffers for the stream channel
maxBookmarkLength = 16 // Maximum number of bytes for a bookmark

timeout = 2 * time.Second
)

const (
Expand Down Expand Up @@ -342,10 +340,7 @@ func (s *StreamServer) handleConnection(conn net.Conn) {
log.Debugf("Command %d[%s] received from %s", command, StrCommand[Command(command)], clientID)
err = s.processCommand(Command(command), s.getSafeClient(clientID))
if err != nil {
// Kill client connection
time.Sleep(timeout)
s.killClient(clientID)
return
log.Errorf("Error processing command %d[%s] from %s: %v", command, StrCommand[Command(command)], clientID, err)
}
}
}
Expand Down
Loading