Skip to content

Commit e6dab5d

Browse files
Remove write lock option from the avm static API (#2154)
1 parent 7f61fee commit e6dab5d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

vms/avm/vm.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,16 +348,17 @@ func (vm *VM) CreateHandlers(context.Context) (map[string]*common.HTTPHandler, e
348348
}
349349

350350
func (*VM) CreateStaticHandlers(context.Context) (map[string]*common.HTTPHandler, error) {
351-
newServer := rpc.NewServer()
351+
server := rpc.NewServer()
352352
codec := json.NewCodec()
353-
newServer.RegisterCodec(codec, "application/json")
354-
newServer.RegisterCodec(codec, "application/json;charset=UTF-8")
355-
356-
// name this service "avm"
353+
server.RegisterCodec(codec, "application/json")
354+
server.RegisterCodec(codec, "application/json;charset=UTF-8")
357355
staticService := CreateStaticService()
358356
return map[string]*common.HTTPHandler{
359-
"": {LockOptions: common.WriteLock, Handler: newServer},
360-
}, newServer.RegisterService(staticService, "avm")
357+
"": {
358+
LockOptions: common.NoLock,
359+
Handler: server,
360+
},
361+
}, server.RegisterService(staticService, "avm")
361362
}
362363

363364
/*

0 commit comments

Comments
 (0)