Fixed bug - If client send a bad packet to server, server maybe crash.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>