bketelsen/skynet — pull request #167 by mikespook (2012-10-26 16:35:18+00:00)
Title: the `ServiceDelegate.Stopped` will be called twice

According to https://github.com/bketelsen/skynet/wiki/Service-Tutorial, `service.Shutdown` will be call in main.main's defer function. Is it a good practice, right?

But in the source https://github.com/bketelsen/skynet/blob/master/service/service.go, line 472, function `watchSignals` was called the Shutdown when captured a signal.

So, the `ServiceDelegate.Stopped` will be called twice.

This patch fixed that issue.