Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
be786108
Commit
be786108
authored
Dec 27, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: make buffer real big for writes [GH-755]
parent
b5f1fd14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
packer/rpc/muxconn.go
packer/rpc/muxconn.go
+8
-5
No files found.
packer/rpc/muxconn.go
View file @
be786108
...
...
@@ -402,10 +402,13 @@ func (m *MuxConn) loop() {
case
streamStateFinWait2
:
fallthrough
case
streamStateEstablished
:
if
len
(
data
)
>
0
{
select
{
case
stream
.
writeCh
<-
data
:
default
:
panic
(
fmt
.
Sprintf
(
"Failed to write data, buffer full for stream %d"
,
id
))
panic
(
fmt
.
Sprintf
(
"Failed to write data, buffer full for stream %d"
,
id
))
}
}
default
:
log
.
Printf
(
"[ERR] Data received for stream in state: %d"
,
stream
.
state
)
...
...
@@ -469,7 +472,7 @@ const (
func
newStream
(
from
muxPacketFrom
,
id
uint32
,
m
*
MuxConn
)
*
Stream
{
// Create the stream object and channel where data will be sent to
dataR
,
dataW
:=
io
.
Pipe
()
writeCh
:=
make
(
chan
[]
byte
,
25
6
)
writeCh
:=
make
(
chan
[]
byte
,
409
6
)
// Set the data channel so we can write to it.
stream
:=
&
Stream
{
...
...
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