mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
bugfix : start master
This commit is contained in:
@@ -57,16 +57,17 @@ static void *
|
|||||||
_master_thread(void *ud) {
|
_master_thread(void *ud) {
|
||||||
struct master_arg * args = ud;
|
struct master_arg * args = ud;
|
||||||
skynet_master(args->context, args->port);
|
skynet_master(args->context, args->port);
|
||||||
|
free(args);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_start_master(void * context, const char * port) {
|
_start_master(void * context, const char * port) {
|
||||||
pthread_t pid;
|
pthread_t pid;
|
||||||
struct master_arg args;
|
struct master_arg * args = malloc(sizeof(*args));
|
||||||
args.context = context;
|
args->context = context;
|
||||||
args.port = port;
|
args->port = port;
|
||||||
pthread_create(&pid, NULL, _master_thread, &args);
|
pthread_create(&pid, NULL, _master_thread, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user