Add control+c or INT handling

This commit is contained in:
Chris Lu
2014-05-13 00:03:10 -07:00
parent 68ceea3f8d
commit 982aaa41b9
3 changed files with 37 additions and 30 deletions

View File

@@ -74,3 +74,9 @@ func NewVolumeServer(r *http.ServeMux, ip string, port int, publicIp string, fol
return vs
}
func (vs *VolumeServer) Shutdown() {
glog.V(0).Infoln("Shutting down volume server...")
vs.store.Close()
glog.V(0).Infoln("Shut down successfully!")
}