@@ -218,9 +218,11 @@ void SctpTransport::runConnectAndSendLoop() {
}
} catch (const std::exception &e) {
std::cerr << "SCTP send: " << e.what() << std::endl;
- mStopping = true;
- return;
+
+ changeState(State::Disconnected);
+ mStopping = true;
+ mConnectCondition.notify_all();
bool SctpTransport::doSend(message_ptr message) {
@@ -73,8 +73,8 @@ private:
void processData(const byte *data, size_t len, uint16_t streamId, PayloadId ppid);
void processNotification(const union sctp_notification *notify, size_t len);
+ const uint16_t mPort;
struct socket *mSock;
- uint16_t mPort;
Queue<message_ptr> mSendQueue;
std::thread mSendThread;