Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
logstash-forwarder
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LaaS
logstash-forwarder
Commits
5bb450f8
Commit
5bb450f8
authored
Sep 16, 2013
by
Jordan Sissel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from fayep/master
Fix window size calculation
parents
4fda9a3d
8e755458
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/lumberjack/client.rb
lib/lumberjack/client.rb
+2
-2
No files found.
lib/lumberjack/client.rb
View file @
5bb450f8
...
...
@@ -100,7 +100,7 @@ module Lumberjack
public
def
write_hash
(
hash
)
frame
=
to_frame
(
hash
,
inc
)
ack
if
(
@sequence
-
@last_ack
)
>=
@window_size
ack
if
(
@sequence
-
(
@last_ack
+
1
)
)
>=
@window_size
write
frame
end
...
...
@@ -110,7 +110,7 @@ module Lumberjack
type
=
@socket
.
read
(
1
)
raise
"Whoa we shouldn't get this frame:
#{
type
}
"
if
type
!=
"A"
@last_ack
=
@socket
.
read
(
4
).
unpack
(
"N"
).
first
ack
if
(
@sequence
-
@last_ack
)
>=
@window_size
ack
if
(
@sequence
-
(
@last_ack
+
1
)
)
>=
@window_size
end
private
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment