mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-28 20:32:09 +01:00
v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update
This commit is contained in:
@@ -51,7 +51,7 @@ func NewStreamRoute(entry *P.StreamEntry) (*StreamRoute, E.NestedError) {
|
||||
|
||||
func (r *StreamRoute) Start() E.NestedError {
|
||||
if r.started.Load() {
|
||||
return E.ErrAlreadyStarted
|
||||
return E.Invalid("state", "already started")
|
||||
}
|
||||
r.wg.Wait()
|
||||
if err := r.Setup(); err != nil {
|
||||
@@ -66,7 +66,7 @@ func (r *StreamRoute) Start() E.NestedError {
|
||||
|
||||
func (r *StreamRoute) Stop() E.NestedError {
|
||||
if !r.started.Load() {
|
||||
return E.ErrNotStarted
|
||||
return E.Invalid("state", "not started")
|
||||
}
|
||||
l := r.l
|
||||
close(r.stopCh)
|
||||
|
||||
Reference in New Issue
Block a user