Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
411520fd
Commit
411520fd
authored
5 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Increase putcom() timeout to 10 seconds to allow network buffers to drain.
parent
b4106a1a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/syncterm/telnet_io.c
+13
-2
13 additions, 2 deletions
src/syncterm/telnet_io.c
with
13 additions
and
2 deletions
src/syncterm/telnet_io.c
+
13
−
2
View file @
411520fd
...
...
@@ -51,8 +51,19 @@ void putcom(char* buf, size_t len)
FD_ZERO
(
&
wds
);
FD_SET
(
telnet_sock
,
&
wds
);
struct
timeval
tv
;
tv
.
tv_sec
=
0
;
tv
.
tv_usec
=
1000
;
tv
.
tv_sec
=
10
;
tv
.
tv_usec
=
0
;
/*
* Note, this select() call was added when debugging file transfer
* issues presumably because something made it appear to "hang forever".
* Since blocking sockets are used, this is very much not a complete
* fix as the buffer size will usually be greater than the one byte
* select() guarantees you will be able to send().
*
* The original fix waited 1ms in select(), which is unlikely to actually
* allow the ACK to come back fast enough to clear a full output buffer.
* I've increased it to 10s and left the select() in place.
*/
if
(
select
(
telnet_sock
+
1
,
NULL
,
&
wds
,
NULL
,
&
tv
)
==
1
)
{
char
str
[
128
];
char
*
p
=
str
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment