mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 19:57:48 +02:00
Merge branch 'PurpleI2P-openssl' into ui
This commit is contained in:
commit
cbe033146a
4 changed files with 16 additions and 9 deletions
|
@ -21,7 +21,6 @@ a.button {
|
|||
-moz-appearance: button;
|
||||
appearance: button;
|
||||
text-decoration: none;
|
||||
color: initial;
|
||||
padding: 0 5px;
|
||||
border: 1px solid #894C84;
|
||||
}
|
||||
|
@ -198,7 +197,6 @@ textarea {
|
|||
-moz-appearance: button;
|
||||
appearance: button;
|
||||
text-decoration: none;
|
||||
color: initial;
|
||||
margin-top: 10px;
|
||||
padding: 6px;
|
||||
border: 1px solid #894c84;
|
||||
|
|
|
@ -104,6 +104,7 @@ namespace stream
|
|||
|
||||
void Stream::Terminate (bool deleteFromDestination) // shoudl be called from StreamingDestination::Stop only
|
||||
{
|
||||
m_Status = eStreamStatusTerminated;
|
||||
m_AckSendTimer.cancel ();
|
||||
m_ReceiveTimer.cancel ();
|
||||
m_ResendTimer.cancel ();
|
||||
|
@ -857,12 +858,15 @@ namespace stream
|
|||
|
||||
void Stream::ScheduleResend ()
|
||||
{
|
||||
m_ResendTimer.cancel ();
|
||||
// check for invalid value
|
||||
if (m_RTO <= 0) m_RTO = INITIAL_RTO;
|
||||
m_ResendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTO));
|
||||
m_ResendTimer.async_wait (std::bind (&Stream::HandleResendTimer,
|
||||
shared_from_this (), std::placeholders::_1));
|
||||
if (m_Status != eStreamStatusTerminated)
|
||||
{
|
||||
m_ResendTimer.cancel ();
|
||||
// check for invalid value
|
||||
if (m_RTO <= 0) m_RTO = INITIAL_RTO;
|
||||
m_ResendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTO));
|
||||
m_ResendTimer.async_wait (std::bind (&Stream::HandleResendTimer,
|
||||
shared_from_this (), std::placeholders::_1));
|
||||
}
|
||||
}
|
||||
|
||||
void Stream::HandleResendTimer (const boost::system::error_code& ecode)
|
||||
|
|
|
@ -152,7 +152,8 @@ namespace stream
|
|||
eStreamStatusOpen,
|
||||
eStreamStatusReset,
|
||||
eStreamStatusClosing,
|
||||
eStreamStatusClosed
|
||||
eStreamStatusClosed,
|
||||
eStreamStatusTerminated
|
||||
};
|
||||
|
||||
class StreamingDestination;
|
||||
|
|
|
@ -1207,7 +1207,11 @@ namespace client
|
|||
void SAMSingleSession::StopLocalDestination ()
|
||||
{
|
||||
localDestination->Release ();
|
||||
// stop accepting new streams
|
||||
localDestination->StopAcceptingStreams ();
|
||||
// terminate existing streams
|
||||
auto s = localDestination->GetStreamingDestination (); // TODO: take care about datagrams
|
||||
if (s) s->Stop ();
|
||||
}
|
||||
|
||||
void SAMMasterSession::Close ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue