diff --git a/pkg/liberrors/server.go b/pkg/liberrors/server.go index 06875930..a82f8f53 100644 --- a/pkg/liberrors/server.go +++ b/pkg/liberrors/server.go @@ -280,10 +280,10 @@ func (e ErrServerUDPPortsAlreadyInUse) Error() string { e.Port, e.Port+1) } -// ErrServerSessionNoAssociatedConns is an error that can be returned by a server. -type ErrServerSessionNoAssociatedConns struct{} +// ErrServerSessionNotInUse is an error that can be returned by a server. +type ErrServerSessionNotInUse struct{} // Error implements the error interface. -func (e ErrServerSessionNoAssociatedConns) Error() string { - return "there are no associated connections anymore" +func (e ErrServerSessionNotInUse) Error() string { + return "not in use" } diff --git a/serversession.go b/serversession.go index ba488118..042d8bd9 100644 --- a/serversession.go +++ b/serversession.go @@ -305,7 +305,7 @@ func (ss *ServerSession) run() { *ss.setuppedTransport == TransportTCP { // close if there are no associated connections if len(ss.conns) == 0 { - return liberrors.ErrServerSessionNoAssociatedConns{} + return liberrors.ErrServerSessionNotInUse{} } }