mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-14 20:39:36 +03:00
Fix context api and document (#727)
* Fix Dial function crash instance when there is no instance context in the ctx * check ctx to fix. (#841) * Feat: core.ToContext(ctx, v) for ctx initialization (#852) * remove exported API: toContext * Remove unnecessary API * rework document for API * fix: make sure the ctx is propagated to connections by detached connection Co-authored-by: Shelikhoo <xiaokangwang@outlook.com> Co-authored-by: rurirei <72071920+rurirei@users.noreply.github.com>
This commit is contained in:
@ -5,9 +5,10 @@ import (
|
||||
"testing"
|
||||
|
||||
. "github.com/xtls/xray-core/core"
|
||||
_ "unsafe"
|
||||
)
|
||||
|
||||
func TestContextPanic(t *testing.T) {
|
||||
func TestFromContextPanic(t *testing.T) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
if r == nil {
|
||||
|
Reference in New Issue
Block a user