mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-14 03:50:05 +00:00
shardserver: added Service()
also, Start() now returns an error result
This commit is contained in:
parent
23170093ee
commit
e5a9ed1481
@ -50,9 +50,9 @@ func NewShardServer(ctx context.Context, dbHndlr *db.DBHandler, redisHndlr *redi
|
||||
return server, nil
|
||||
}
|
||||
|
||||
func (server *ShardServer) Start() {
|
||||
func (server *ShardServer) Start() error {
|
||||
server.LoadNPCs()
|
||||
server.service.Start()
|
||||
return server.service.Start()
|
||||
}
|
||||
|
||||
func (server *ShardServer) onDisconnect(peer *cnet.Peer) {
|
||||
@ -66,3 +66,7 @@ func (server *ShardServer) onDisconnect(peer *cnet.Peer) {
|
||||
func (server *ShardServer) onConnect(peer *cnet.Peer) {
|
||||
|
||||
}
|
||||
|
||||
func (server *ShardServer) Service() *cnet.Service {
|
||||
return server.service
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user