mirror of
https://github.com/kataras/iris.git
synced 2026-01-10 05:25:58 +00:00
move sessions and websocket examples, gofmt, fix misspells and experimental optimizations 🍐
Former-commit-id: cae4f94bbd404d26ab13dade02b52f81feaddf24
This commit is contained in:
@@ -105,7 +105,7 @@ func (su *Supervisor) newListener() (net.Listener, error) {
|
||||
return l, nil
|
||||
}
|
||||
|
||||
// RegisterOnError registers a function to call when errors occured by the underline http server.
|
||||
// RegisterOnError registers a function to call when errors occurred by the underline http server.
|
||||
func (su *Supervisor) RegisterOnError(cb func(error)) {
|
||||
su.mu.Lock()
|
||||
su.onErr = append(su.onErr, cb)
|
||||
|
||||
@@ -33,7 +33,7 @@ func WriteStartupLogOnServe(w io.Writer) func(TaskHost) {
|
||||
}
|
||||
|
||||
// ShutdownOnInterrupt terminates the supervisor and its underline server when CMD+C/CTRL+C pressed.
|
||||
// This function should be registerd on Interrupt.
|
||||
// This function should be registered on Interrupt.
|
||||
func ShutdownOnInterrupt(su *Supervisor, shutdownTimeout time.Duration) func() {
|
||||
return func() {
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), shutdownTimeout)
|
||||
|
||||
Reference in New Issue
Block a user