Skip to content

Commit 6416ff1

Browse files
committed
Pause channel at completion of electrum handshake.
1 parent fa58d37 commit 6416ff1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/protocols/protocol_electrum_version.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void protocol_electrum_version::complete(const code& ec,
7070
// Calls after handshake completion are allowed and will skip this.
7171
if (handler_)
7272
{
73-
// shake error will result in stopped channel.
73+
// Invoke handshake completion, error will result in stopped channel.
7474
(*handler_)(shake);
7575
handler_.reset();
7676
}
@@ -105,6 +105,9 @@ void protocol_electrum_version::handle_server_version(const code& ec,
105105
}
106106
}, 70, BIND(complete, _1, error::success));
107107
}
108+
109+
// Handshake must leave channel paused, before leaving stranded handler.
110+
if (handler_) pause();
108111
}
109112

110113
// Client/server names.

0 commit comments

Comments
 (0)