v0.5: fixed nil dereference for empty autocert config, fixed and simplified 'error' module, small readme and docs update

This commit is contained in:
default
2024-08-13 04:59:34 +08:00
parent 2fc82c3790
commit 85fb637551
20 changed files with 209 additions and 235 deletions

View File

@@ -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)