Skip to content

Inquiry about the Transfer of OnStreamDone and OnHttpStreamDone from proxyOnDone to proxyOnLog #12

@007gzs

Description

@007gzs

func proxyOnLog(contextID uint32) {
if recordTiming {
defer logTiming("proxyOnLog", time.Now())
}
if ctx, ok := currentState.tcpContexts[contextID]; ok {
currentState.setActiveContextID(contextID)
ctx.OnStreamDone()
} else if ctx, ok := currentState.httpContexts[contextID]; ok {
currentState.setActiveContextID(contextID)
ctx.OnHttpStreamDone()
}
}
//go:wasmexport proxy_on_done
func proxyOnDone(contextID uint32) bool {
if recordTiming {
defer logTiming("proxyOnDone", time.Now())
}
if ctx, ok := currentState.pluginContexts[contextID]; ok {
currentState.setActiveContextID(contextID)
return ctx.context.OnPluginDone()
}
return true
}

我想知道为什么将 OnStreamDoneOnHttpStreamDoneproxyOnDone 移动到 proxyOnLog 中?最初发生在以下pr

I would like to know the reason for moving OnStreamDone and OnHttpStreamDone from proxyOnDone to proxyOnLog? This change initially occurred in the following PR:

tetratelabs@5653913#diff-39c7215b91b6d02ceae7df97f3ee68081cba42436afcd08c95df524f72707f2a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions