avoid error circulation

This commit is contained in:
Cloud Wu
2018-02-12 18:05:09 +08:00
committed by 云风
parent 0846a6533d
commit 9cf4525a8f

View File

@@ -707,7 +707,7 @@ mainloop(struct skynet_context * context, void * ud, int type, int session, uint
}
default:
skynet_error(context, "recv invalid message from %x, type = %d", source, type);
if (session != 0) {
if (session != 0 && type != PTYPE_ERROR) {
skynet_send(context,0,source,PTYPE_ERROR, session, NULL, 0);
}
return 0;