Skip to content
Snippets Groups Projects
Commit 8d430175 authored by fangyincheng's avatar fangyincheng
Browse files

Mod:go mod & import & const

parent 56c5c124
No related branches found
No related tags found
No related merge requests found
package dubbo package dubbo
import ( import (
"github.com/dubbo/dubbo-go/server"
"time" "time"
) )
import ( import (
"github.com/dubbo/dubbo-go/server"
jerrors "github.com/juju/errors" jerrors "github.com/juju/errors"
) )
......
...@@ -14,6 +14,9 @@ import ( ...@@ -14,6 +14,9 @@ import (
jerrors "github.com/juju/errors" jerrors "github.com/juju/errors"
) )
// todo: WritePkg_Timeout will entry *.yml
const WritePkg_Timeout = 5*time.Second
var ( var (
errTooManySessions = jerrors.New("too many sessions") errTooManySessions = jerrors.New("too many sessions")
) )
...@@ -280,7 +283,7 @@ func (h *RpcServerHandler) reply(session getty.Session, req *DubboPackage, tp he ...@@ -280,7 +283,7 @@ func (h *RpcServerHandler) reply(session getty.Session, req *DubboPackage, tp he
resp.Body = nil resp.Body = nil
} }
if err := session.WritePkg(resp, 10*time.Second); err != nil { if err := session.WritePkg(resp, WritePkg_Timeout); err != nil {
log.Error("WritePkg error: %#v, %#v", jerrors.Trace(err), req.Header) log.Error("WritePkg error: %#v, %#v", jerrors.Trace(err), req.Header)
} }
} }
...@@ -4,9 +4,8 @@ require ( ...@@ -4,9 +4,8 @@ require (
github.com/AlexStocks/getty v0.0.0-20190331201845-1ca64ac5a589 github.com/AlexStocks/getty v0.0.0-20190331201845-1ca64ac5a589
github.com/AlexStocks/goext v0.3.2 github.com/AlexStocks/goext v0.3.2
github.com/AlexStocks/log4go v1.0.2 github.com/AlexStocks/log4go v1.0.2
github.com/dubbogo/hessian2 v0.0.0-20190331022028-ade83b794bf2 github.com/dubbogo/hessian2 v0.0.0-20190405234732-5b4d49312622
github.com/juju/errors v0.0.0-20190207033735-e65537c515d7 github.com/juju/errors v0.0.0-20190207033735-e65537c515d7
github.com/pkg/errors v0.8.1
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec
gopkg.in/yaml.v2 v2.2.2 gopkg.in/yaml.v2 v2.2.2
) )
...@@ -23,8 +23,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c ...@@ -23,8 +23,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dubbogo/hessian2 v0.0.0-20190331022028-ade83b794bf2 h1:5kv4/4ptZTNcG2dzfHqXPiBHZcPPR3jshgxpHvlidew= github.com/dubbogo/hessian2 v0.0.0-20190405234732-5b4d49312622 h1:jZgBUBFsuIsqvrVCXwDKpSdeYyqnnZU6ABBNNPWdVFo=
github.com/dubbogo/hessian2 v0.0.0-20190331022028-ade83b794bf2/go.mod h1:v+gfInE8fm/k3Fjkb2oUCKSO9LKbWvf+PtweEI89BmI= github.com/dubbogo/hessian2 v0.0.0-20190405234732-5b4d49312622/go.mod h1:v+gfInE8fm/k3Fjkb2oUCKSO9LKbWvf+PtweEI89BmI=
github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI= github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0CI=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment