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
df70443a
Commit
df70443a
authored
Aug 23, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: less panics
parent
043264ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
packer/rpc/builder.go
packer/rpc/builder.go
+6
-6
No files found.
packer/rpc/builder.go
View file @
df70443a
...
...
@@ -61,20 +61,20 @@ func (b *builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
go
func
()
{
defer
responseL
.
Close
()
var
response
BuilderRunResponse
defer
func
()
{
runResponseCh
<-
&
response
}()
conn
,
err
:=
responseL
.
Accept
()
if
err
!=
nil
{
log
.
Panic
(
err
)
response
.
Err
=
err
return
}
defer
conn
.
Close
()
decoder
:=
gob
.
NewDecoder
(
conn
)
var
response
BuilderRunResponse
if
err
:=
decoder
.
Decode
(
&
response
);
err
!=
nil
{
response
.
Err
=
fmt
.
Errorf
(
"Error waiting for Run: %s"
,
err
)
}
runResponseCh
<-
&
response
}()
args
:=
&
BuilderRunArgs
{
...
...
@@ -154,7 +154,7 @@ func (b *BuilderServer) Run(args *BuilderRunArgs, reply *interface{}) error {
err
:=
responseWriter
.
Encode
(
&
BuilderRunResponse
{
responseErr
,
responseAddress
})
if
err
!=
nil
{
panic
(
err
)
log
.
Printf
(
"BuildServer.Run error: %s"
,
err
)
}
}()
...
...
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