Skip to content

Commit

Permalink
Remove write lock option from the avm static API (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Oct 11, 2023
1 parent 7f61fee commit e6dab5d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions vms/avm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,17 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]*common.HTTPHandler, e
}

func (*VM) CreateStaticHandlers(context.Context) (map[string]*common.HTTPHandler, error) {
newServer := rpc.NewServer()
server := rpc.NewServer()
codec := json.NewCodec()
newServer.RegisterCodec(codec, "application/json")
newServer.RegisterCodec(codec, "application/json;charset=UTF-8")

// name this service "avm"
server.RegisterCodec(codec, "application/json")
server.RegisterCodec(codec, "application/json;charset=UTF-8")
staticService := CreateStaticService()
return map[string]*common.HTTPHandler{
"": {LockOptions: common.WriteLock, Handler: newServer},
}, newServer.RegisterService(staticService, "avm")
"": {
LockOptions: common.NoLock,
Handler: server,
},
}, server.RegisterService(staticService, "avm")
}

/*
Expand Down

0 comments on commit e6dab5d

Please sign in to comment.