File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ cdef class Channel:
6363
6464 if self ._libssh_channel is NULL :
6565 raise MemoryError
66- rc = libssh.ssh_channel_open_session(self ._libssh_channel)
67-
66+ rc = libssh.SSH_AGAIN
67+ while rc == libssh.SSH_AGAIN:
68+ rc = libssh.ssh_channel_open_session(self ._libssh_channel)
6869 if rc != libssh.SSH_OK:
6970 libssh.ssh_channel_free(self ._libssh_channel)
7071 self ._libssh_channel = NULL
@@ -164,7 +165,9 @@ cdef class Channel:
164165 if channel is NULL :
165166 raise MemoryError
166167
167- rc = libssh.ssh_channel_open_session(channel)
168+ rc = libssh.SSH_AGAIN
169+ while rc == libssh.SSH_AGAIN:
170+ rc = libssh.ssh_channel_open_session(channel)
168171 if rc != libssh.SSH_OK:
169172 libssh.ssh_channel_free(channel)
170173 raise LibsshChannelException(" Failed to open_session: [{0}]" .format(rc))
You can’t perform that action at this time.
0 commit comments