Add HandleInterrupts comment

This commit is contained in:
Roland Shoemaker 2015-08-03 17:05:45 -07:00
parent b4da19fce4
commit 3d7992ae43
1 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,8 @@ func (rpc *AmqpRPCServer) Start() (finished chan bool, err error) {
return
}
// HandleInterrupts creates a Goroutine to sit and watch for INT and TERM signals
// and cancel the server consumer if it sees one so servers can gracefully shutdown.
func (rpc *AmqpRPCServer) HandleInterrupts() (chan bool, error) {
stopWatching := make(chan bool, 1)
sigChan := make(chan os.Signal, 1)