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
65d391db
Commit
65d391db
authored
Oct 13, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
communicator/ssh: explicitly set c.conn = nil
parent
94487871
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
CHANGELOG.md
CHANGELOG.md
+2
-0
communicator/ssh/communicator.go
communicator/ssh/communicator.go
+8
-0
No files found.
CHANGELOG.md
View file @
65d391db
...
...
@@ -8,6 +8,8 @@ BUG FIXES:
*
builder/digitalocean: scrub API keys from config debug output [GH-516]
*
builder/virtualbox: error if VirtualBox version cant be detected. [GH-488]
*
builder/virtualbox: detect if vboxdrv isn't properly setup. [GH-488]
*
communicator/ssh: Fix issue where a panic could arise from a nil
dereference. [GH-525]
## 0.3.9 (October 2, 2013)
...
...
communicator/ssh/communicator.go
View file @
65d391db
...
...
@@ -238,6 +238,14 @@ func (c *comm) reconnect() (err error) {
log
.
Printf
(
"reconnecting to TCP connection for SSH"
)
c
.
conn
,
err
=
c
.
config
.
Connection
()
if
err
!=
nil
{
// Explicitly set this to the REAL nil. Connection() can return
// a nil implementation of net.Conn which will make the
// "if c.conn == nil" check fail above. Read here for more information
// on this psychotic language feature:
//
// http://golang.org/doc/faq#nil_error
c
.
conn
=
nil
log
.
Printf
(
"reconnection error: %s"
,
err
)
return
}
...
...
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