Network/AbstractSocket: Update OnStateChange signal

Now it is called before the state changes really


Former-commit-id: 3eec47302a971d798e1a75415377243bd743ce3f
This commit is contained in:
Lynix 2015-11-10 12:17:30 +01:00
parent 2a70758f08
commit 890e5c75d6
2 changed files with 2 additions and 3 deletions

View File

@ -36,7 +36,7 @@ namespace Nz
unsigned int QueryAvailableBytes() const; unsigned int QueryAvailableBytes() const;
// Slots // Slots
NazaraSignal(OnStateChange, const AbstractSocket* /*socket*/, SocketState /*oldState*/, SocketState /*newState*/); NazaraSignal(OnStateChange, const AbstractSocket* /*socket*/, SocketState /*newState*/);
protected: protected:
AbstractSocket(SocketType type); AbstractSocket(SocketType type);

View File

@ -35,9 +35,8 @@ namespace Nz
{ {
if (m_state != newState) if (m_state != newState)
{ {
SocketState oldState = m_state; OnStateChange(this, m_state);
m_state = newState; m_state = newState;
OnStateChange(this, oldState, m_state);
} }
} }
} }