Skip to content

Commit 33c1141

Browse files
committedMay 8, 2015
Gracefully handle PacketErrors
1 parent 0e64fc4 commit 33c1141

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎src/server.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1227,11 +1227,14 @@ void Server::ProcessData(NetworkPacket *pkt)
12271227
}
12281228

12291229
handleCommand(pkt);
1230-
}
1231-
catch(SendFailedException &e) {
1230+
} catch (SendFailedException &e) {
12321231
errorstream << "Server::ProcessData(): SendFailedException: "
12331232
<< "what=" << e.what()
12341233
<< std::endl;
1234+
} catch (PacketError &e) {
1235+
actionstream << "Server::ProcessData(): PacketError: "
1236+
<< "what=" << e.what()
1237+
<< std::endl;
12351238
}
12361239
}
12371240

1 commit comments

Comments
 (1)

nerzhul commented on May 11, 2015

@nerzhul
Contributor

Great !

Please sign in to comment.