Skip to content

Commit

Permalink
check if structure is non-nil before closing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Lin committed Jul 18, 2019
1 parent 1d4b619 commit 6b90772
Show file tree
Hide file tree
Showing 9 changed files with 885 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ func (app *App) closeConn(data []byte) error {
delete(app.conns, loop)
app.mu.Unlock()

return conn.Close()
if conn != nil {
return conn.Close()
}
return nil
}

func (app *App) confirmLoop(data []byte) error {
Expand Down
10 changes: 9 additions & 1 deletion vendor/github.com/skycoin/dmsg/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/github.com/skycoin/dmsg/transport.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6b90772

Please sign in to comment.