Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
fa80a17a
Commit
fa80a17a
authored
Oct 01, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make recv_data less greedy so it doesn't eat other packets
parent
8923a5b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/ansible/runner/connection_plugins/accelerate.py
+2
-2
library/utilities/accelerate
+2
-2
No files found.
lib/ansible/runner/connection_plugins/accelerate.py
View file @
fa80a17a
...
...
@@ -138,7 +138,7 @@ class Connection(object):
try
:
vvvv
(
"
%
s: in recv_data(), waiting for the header"
%
self
.
host
)
while
len
(
data
)
<
header_len
:
d
=
self
.
conn
.
recv
(
1024
)
d
=
self
.
conn
.
recv
(
header_len
-
len
(
data
)
)
if
not
d
:
vvvv
(
"
%
s: received nothing, bailing out"
%
self
.
host
)
return
None
...
...
@@ -148,7 +148,7 @@ class Connection(object):
data
=
data
[
header_len
:]
vvvv
(
"
%
s: data received so far (expecting
%
d):
%
d"
%
(
self
.
host
,
data_len
,
len
(
data
)))
while
len
(
data
)
<
data_len
:
d
=
self
.
conn
.
recv
(
1024
)
d
=
self
.
conn
.
recv
(
data_len
-
len
(
data
)
)
if
not
d
:
vvvv
(
"
%
s: received nothing, bailing out"
%
self
.
host
)
return
None
...
...
library/utilities/accelerate
View file @
fa80a17a
...
...
@@ -198,7 +198,7 @@ class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
data
=
b
""
vvvv
(
"in recv_data(), waiting for the header"
)
while
len
(
data
)
<
header_len
:
d
=
self
.
request
.
recv
(
1024
)
d
=
self
.
request
.
recv
(
header_len
-
len
(
data
)
)
if
not
d
:
vvv
(
"received nothing, bailing out"
)
return
None
...
...
@@ -208,7 +208,7 @@ class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
data
=
data
[
header_len
:]
vvvv
(
"data received so far (expecting
%
d):
%
d"
%
(
data_len
,
len
(
data
)))
while
len
(
data
)
<
data_len
:
d
=
self
.
request
.
recv
(
1024
)
d
=
self
.
request
.
recv
(
data_len
-
len
(
data
)
)
if
not
d
:
vvv
(
"received nothing, bailing out"
)
return
None
...
...
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