1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

Better NetSendResult when trying to send on an unconnected connection

This commit is contained in:
lidgren
2012-01-16 09:27:56 +00:00
parent 4cd624c42c
commit 61ec7e3add
4 changed files with 10 additions and 8 deletions

View File

@@ -292,6 +292,9 @@ namespace Lidgren.Network
// called by SendMessage() and NetPeer.SendMessage; ie. may be user thread
internal NetSendResult EnqueueMessage(NetOutgoingMessage msg, NetDeliveryMethod method, int sequenceChannel)
{
if (m_status != NetConnectionStatus.Connected)
return NetSendResult.FailedNotConnected;
NetMessageType tp = (NetMessageType)((int)method + sequenceChannel);
msg.m_messageType = tp;