mirror of https://github.com/SeanOMik/libki.git
net: Fix some observed problems
It seems the client sends application messages before the session has been established.
This commit is contained in:
parent
d1118a937b
commit
1927426034
|
@ -23,7 +23,11 @@ namespace net
|
|||
return;
|
||||
}
|
||||
|
||||
// Are we sufficiently authenticated to handle this message?
|
||||
if (get_access_level() >= message->get_access_level())
|
||||
on_message(*message);
|
||||
else
|
||||
on_invalid_message();
|
||||
delete message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,10 +182,8 @@ namespace net
|
|||
// whether this is a control packet or not
|
||||
if (header.is_control())
|
||||
on_control_message(header);
|
||||
else if (m_established)
|
||||
on_application_message(header);
|
||||
else
|
||||
close();
|
||||
on_application_message(header);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue