10000 no longer need new request after opendir stat · etherscan-io/sftp@57673e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57673e3

Browse files
committed
no longer need new request after opendir stat
PR pkg#257 fixes the issue with running Stat and Readdir on the same Request. Thus we no longer need to close and recreate the Request when handling an Opendir call.
1 parent 1de5f77 commit 57673e3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

request-server.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ func (rs *RequestServer) packetWorker(
175175
case *sshFxpOpendirPacket:
176176
request := requestFromPacket(ctx, pkt)
177177
rpkt = request.call(rs.Handlers, pkt)
178-
request.close()
179178
if stat, ok := rpkt.(*sshFxpStatResponse); ok {
180179
if stat.info.IsDir() {
181-
request := requestFromPacket(ctx, pkt)
182180
handle := rs.nextRequest(request)
183181
rpkt = sshFxpHandlePacket{pkt.id(), handle}
184182
} else {

0 commit comments

Comments
 (0)
0