Skip to content

Commit

Permalink
Don't try to close the protobuf server if it's not open
Browse files Browse the repository at this point in the history
Fix #584
  • Loading branch information
jvshahid committed Nov 5, 2014
1 parent d14c148 commit 1f35705
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### Bugfixes

- [Issue #584](https://github.com/influxdb/influxdb/issues/584). Don't
panic if the process died while initializing
- [Issue #800](https://github.com/influxdb/influxdb/issues/800). Use
su instead of sudo in the init script. This fixes the startup problem
on RHEL 6.
Expand Down
4 changes: 4 additions & 0 deletions coordinator/protobuf_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func NewProtobufServer(port string, requestHandler Handler) *ProtobufServer {
}

func (self *ProtobufServer) Close() {
if self.listener == nil {
return
}

self.listener.Close()
self.connectionMapLock.Lock()
defer self.connectionMapLock.Unlock()
Expand Down

0 comments on commit 1f35705

Please sign in to comment.